Redirect shopify newsletter signup form after submit

Topic summary

Issue: A Shopify store owner wants to redirect users to a thank-you page after newsletter signup, instead of the default behavior (reCAPTCHA verification followed by scrolling back to see a confirmation message).

Attempted Solutions:

  • Initial attempt using JavaScript redirect in newsletter.liquid failed
  • Modified approach suggested by a helper also didn’t work—resulted in homepage redirect with query parameters but no actual redirect to intended page
  • The reCAPTCHA step was suspected as a potential interference

Working Solution:

  • Add a hidden input field inside the form tag: <input type="hidden" name="return_to" value="/pages/thank-you/">
  • This approach was confirmed working by multiple users
  • One user requested modification to open the thank-you page in a new tab

Status: Resolved with the hidden input method, though the original poster’s specific implementation issues remain unexplained. The discussion highlights ongoing UX frustrations with Shopify’s default newsletter signup flow in 2021.

Summarized with AI on November 10. AI used: claude-sonnet-4-5-20250929.

Hi. After my visitors submit their email in the newsletter signup form (in the footer), it shows them a reCapture verification and then shoots to the top of the page, but if they scroll down again, they’ll see “You have been subscribed to our newsletter.” (in place of the submit button).

What I’d like to do is redirect to a thank you page. Here’s what I was trying in newsletter.liquid, but it doesn’t make a difference.

Any ideas?

{%- form 'customer', id: newsletter_id, class: 'Newsletter Form' -%}
          {%- if form.posted_successfully? -%}
        
        
        
            

{{ 'home_page.newsletter.success' | t }}

          {%- else -%}
            {%- if form.errors -%}
              

{{ form.errors.messages['email'] }}

            {%- endif -%}

            
              
              
              
            

          {%- endif -%}
        {%- endform -%}

Hi @charlesr

Aibek is here from Speedimize.io

Hope everything is fine on your end:


Change to this:

Hope that helps you.

1 Like

Cheers for trying. It didn’t work. I tried with and without a semi-colon at the end of the line.

It now goes to the homepage with url like: https://mydomainname.co.uk/?contact%5Btags%5D=newsletter&form_type=customer and doesn’t mark the newsletter box has having worked any more (so it’s doing something. Just not the right thing.

Weird. That should work I would have thought. Anything weird about this form setup? Or is it the reCapture step getting in the way? I’ll try turning off the latter.


{% schema %}
{
  "name": "Newsletter",
  "settings": [
    {
      "type": "select",
      "id": "section_size",
      "label": "Section size",
      "options": [
        {
          "value": "small",
          "label": "Small"
        },
        {
          "value": "normal",
          "label": "Normal"
        },
        {
          "value": "large",
          "label": "Large"
        }
      ],
      "default": "small"
    },
    {
      "type": "image_picker",
      "id": "image",
      "label": "Image",
      "info": "1500 x 800px jpg recommended"
    },
    {
      "type": "color",
      "id": "text_color",
      "label": "Text",
      "default": "#ffffff"
    },
    {
      "type": "color",
      "id": "button_color",
      "label": "Button text",
      "default": "#000000"
    },
    {
      "type": "text",
      "id": "subheading",
      "label": "Sub-heading",
      "default": "Keep updated"
    },
    {
      "type": "text",
      "id": "title",
      "label": "Heading",
      "default": "Newsletter"
    },
    {
      "type": "richtext",
      "id": "content",
      "label": "Text",
      "default": "

A short sentence describing what someone will receive by subscribing

"
    }
  ],
  "presets": [
    {
      "category": "Promotional",
      "name": "Newsletter",
      "settings": {}
    }
  ]
}
{% endschema %}

Hi @charlesr

Can you please share URL of your shop?

So we can elaborate on our solution for you.

On our side, everything works without any problems. So we’re wondering why this happening?

Hi. It’s https://runcompany.co.uk

Will this work on the Debut theme?

In theory, it should work in any theme because the default signup code is the same for everyone. No idea why it didn’t work on mine.

I still find it pretty sad that the signup UX is still broken; with the challenge footer anchor link issue AND this with the lack of control on a signup redirect. 2021…
I wonder if @Kinjaldavra or @diego_ezfy would know? Trying to redirect a user after they signup in the Debut theme using the footer email form. Any ideas? Thank you!

1 Like

You can write this code inside your form tag .

2 Likes

Thank you, that was a simple solution, and it worked great.

Hi @rashiduln ,

how could I use your code but open the page in another tab?

Try this one:


where does this code go? I am trying to redirect to another page after they sign up for mailing list instead of staying on the same page