How to add a custom redirect after a survey is submitted

Using Google Tag Manager, you can create a custom redirect for any time a subscriber submits a survey, in place of the confirmation page. This creates a perfect opportunity for you to keep your audience engaging with your content by redirecting them back to a page of your choice. 

Quick tips to get you started


How to add a custom redirect to a survey

  1. Set up a custom trigger and tag in your Google Tag Manager account. Begin by creating a custom trigger in GTM to detect when someone completes your survey. After that, create a tag that executes the redirect code.
     
  2. Log into your beehiiv account and from your left panel Dashboard, navigate to Audience > Surveys.

  3. The surveys you’ve created will be listed. Locate the survey you want to create the redirect for, and click the .

  4. Select Copy url.

  5. Go to tagmanager.google.com and sign in to your Tag Manager workspace.
     
  6. From the left hand panel in your Google Tag Manager workspace, click Triggers > New.
     
  7. For the Trigger Type, enter Click-All Elements.
     
  8. Toggle the selection to Some Clicks.
     
  9. Add the following filters: 
  • Click text equals: Continue

    Tech Note: To find this filter, you may have to click 'Choose Built-in Variable' in the filter field. On the page that pops up, you will be able to select 'Click text' as a filter.
  • Page URL contains: [Your survey form URL]
  1. Name the trigger something descriptive, like ‘Click Continue on Survey Form’.
     
  2. From the left hand panel in your Google Tag Manager workspace, click Tags > New.
     
  3. Type Custom HTML.
     
  4. In the field, paste the following code. Replace “[redirect URL]” with the URL of the page you want to redirect users to.

    <script>
    window.location.href="[redirect URL]"
    </script>
  5. Under Trigger, select the trigger you created in steps 4-11.
     
  6. Give this new tag a name like ‘Survey Form Redirect’. Click Save.
     
  7. Publish your changes and test the setup by submitting responses to your survey and clicking Continue.


Was this article helpful?

Related Articles