Thank You Page Tracking With Google Tag Manager
Updated: March 30th, 2025
In this post, I’ll show how you can implement Thank you page tracking with Google Tag Manager and push this data as events to Google Analytics. This blog post is part of a much larger and more comprehensive guide – Google Tag Manager Form Tracking.
You are probably already familiar with the central GTM concept: every interaction you want to track needs a tag and a trigger. To track all form submissions with Google Analytics, you must create a Google Analytics 4 Tag and a Trigger (rule) when a tag must fire.

Creating a tag is the easy part of this process. Let’s make one – you’ll need it a bit later in this blog post.
In this article, I presume you have already installed Google Analytics 4. This means your container contains the Google tag and the Constant variable (with your GA4 measurement ID). If not, read this blog post first.
After you have a Google tag and a Constant Variable in your GTM container, it’s time to create a GA4 event tag that will be used in all of the examples of this article.
- Go to Tags
- Press New button
- In Tag Configuration choose Google Analytics > Google Analytics: GA4 Event
- In the Measurement ID section, insert your constant variable (with Measurement ID). That way, the event tag that we are creating will reuse some of the settings from the Google tag.
- In the Event Name field, I enter generate_lead
- Leave the Triggering part empty (for now) and click Save. We’ll get back to it later.
Let me quickly explain some of the choices. I used generate_lead as an event name because it is in the list of GA4 Recommended events. But if you want, you can name it something else.
Let’s Create a Trigger
You track the Thank You Page if the standard form listener in Google Tag Manager does not work in your case. In this situation, the form redirects a user after successfully submitting to another page.
- If yes, what URL (web address) does it redirect to?
- Is that address unique?
- If yes, can users navigate to that page without submitting a form? If the answer to the last question is no, you can create a pageview trigger that fires only on that success page. Tip: You can always check your Google Analytics Path Exploration reports to see whether users access the success page from different locations of your website. Your goal here is to avoid accidental visits to the success (a.k.a. “Thank you”) page as much as possible.
Now, let’s create a trigger that fires only on the success page.
- Go to Triggers in Google Tag Manager
- Press the New button
- Choose trigger type – Pageview. You’ll need to set conditional firing, so select the Some page views option.
- If the visitor is redirected to https://www.example.com/form/thankyou.html, then you can set one of the following rules for this trigger:
- Page Path equals /form/thankyou.html.
- or Page URL contains /form/thankyou.html. Try being as specific as possible. Setting just “thankyou” as the rule for this trigger might not be the best idea because there might be other pages that can contain that word (and we don’t want that!) in the URL.
- And do not forget to properly name the trigger – Pageview – Successful Form Submission. A title must be clear; otherwise, you’ll have a mess in your GTM account (in the long run). You can read more about naming tips (a.k.a. Naming Convention) here.
Let’s Test
- Assign this new trigger to the Google Analytics 4 Tag you created at the beginning of this blog post.
- Open (or refresh) the Preview and Debug mode, which will open up a new browser tab for you with the page to test.
- Then fill in the form and submit it. After successful submission, you’ll be redirected to a “Thank you” page – if Google Analytics 4 Tag fires, good job! Also (if possible), try submitting a different form on your website (to see if the tag did not fire on accident).
- You should also check Google Analytics 4 Debug View.
- If you have multiple forms with different thank you pages, you don’t need to set any custom parameters to the GA4 event tag. GA4 automatically tracks page_location, and you can distinguish form submissions with a dimension such as Page Path.
- If, on the other hand, you have multiple forms and one “Thank you” page, you will need to do this:
- Check all these tips and see if you can get a variable containing some form identifier (e.g., form id, form name, etc.) and use it in the next list item.
- Then, include an additional parameter in the GA4 form_submission event tag. It can be something like form_id, form_name, or whatever works for you, for example:
If the Thank You Page Tracking Did Not Work for You
I created a detailed Google Tag Manager form tracking guide with five different form tracking techniques. If “Thank you” page tracking does not apply to your form, check other options mentioned here.
If you have questions, feel free to contact me via social media accounts or write a comment on this blog post.
