How to Implement Thank You Page Tracking with Google Tag Manager
Apr 04, 2024 | Author: Lorenzo Diaco
In this guide we will demonstrate how to implement Thank You page tracking using Google Tag Manager and subsequently push this data as events to Google Analytics.
If you're familiar with GTM, you know that every interaction to be tracked requires a tag and a trigger. To track form submissions with Google Analytics, you'll need to create a Google Analytics 4 Tag and a Trigger that specifies when the tag should fire.
Creating a tag is the straightforward part.
Presuming you have already installed Google Analytics 4, ensure your container contains the Google tag and the Constant variable (with your GA4 measurement ID).
Once you have a Google tag and a Constant Variable in your GTM container, follow these steps to create a GA4 event tag, which will be used throughout this guide:
- 1. Go to Tags.
- 2. Click on the New button.
- 3. Choose Google Analytics > Google Analytics: GA4 Event in Tag Configuration.
- 4. Insert your constant variable (with Measurement ID) in the Measurement ID section to reuse some settings from the Google tag.
- 5. Enter "generate_lead" in the Event Name field.
- 6. Leave the Triggering part empty for now and click Save.
Creating a Trigger
You’ll track the Thank You Page if the standard form listener in Google Tag Manager doesn't work. In such cases, the form redirects a user after successful submission to another page.
If so, identify the URL it redirects to - the form success URL. Is this address unique? Can users navigate to that page without submitting a form?
If the success page is unique, proceed to create a trigger that fires only on that success page:
- 1. Go to Triggers in Google Tag Manager.
- 2. Click on the New button.
- 3. Choose the trigger type as Pageview. Select the Some page views option for conditional firing.
- 4. Set a rule for this trigger based on the success page URL, for example:
- 4.1 Page Path equals /form/thankyou.html.
- 4.2 Page URL contains /form/thankyou.html. Be specific to avoid accidental triggers.
- 5. Properly name the trigger, for instance: Pageview – Successful Form Submission.
Testing
Assign the newly created trigger to the Google Analytics 4 Tag.
- 1. Open (or refresh) the Preview and Debug mode.
- 2. Fill in the form and submit it. Ensure the Google Analytics 4 Tag fires upon successful submission.
- 3. Optionally, try submitting a different form on your website to verify the tag's functionality.
- 4. Check Google Analytics 4 Debug View for confirmation.
For websites with multiple forms with different thank you pages, GA4 automatically tracks page_location. However, if you have multiple forms leading to one "Thank you" page, follow these steps:
- 1. Ensure you can obtain a variable containing a form identifier (e.g., form id, form name, etc.).
- 2. Include this identifier as an additional parameter in the GA4 form_submission event tag, for example:
- "form_id" or "form_name".
Recent Posts
-
Google Discover Publisher Rankings in April 2026: winners, losers, and major shifts
May 18, 2026 | Author: Anna Battistella
-
Google launches "Preferred Sources" worldwide: what changes for SEO and Publishers
Apr 30, 2026 | Author: Anna Battistella
-
Case Study: How Money.it eliminated data sampling and sped up editorial decisions by switching to Publytics
Apr 27, 2026 | Author: Anna Battistella
-
Google Discover Publisher Rankings in March 2026: winners, losers, and major shifts
Apr 23, 2026 | Author: Anna Battistella
-
How to find the Google Discover Profile “Follow” link for any website
Mar 06, 2026 | Author: Anna Battistella
Start monitoring your websites in few seconds No credit card required!
Start monitoring your websites in few seconds