Let's say someone buys something from your website and lands on a certain 'Thank You' page. Usually, these are the pages that show your order receipt with a distinct URL. We can register this page visit as an event in Google Analytics 4 (GA4). This guide will show you how to track thank you page events in GA4 via Google Tag Manager (GTM)!
➡️🎥 Check our YouTube Channel for more Google Tag Manager Tutorials!
How to Track Thank You Page Events in GA4 via Google Tag Manager (GTM)
1. Ensure Google Tag Manager is installed on all website pages
2. Navigate to Variables, and toggle on all Variables
3. Create a new tag and configure the tag
1. Create a new tag
2. Name the tag accordingly
3. Under tag configuration, select the option Google Analytics: GA4 Event
4. Name the event accordingly
5. Under Configuration Tag, insert your GA4 Measurement ID
If this is the first time you're setting up a tag, you need to input your Measurement ID which you can find in Google Analytics under Admin > Data Streams. If this is the second time you're setting up events, the system will record your Measurement ID.
4. Create a new trigger and configure the trigger
1. Create a new trigger
2. Name the trigger accordingly
3. Under Trigger Configuration, select Page View as the trigger type
4. Select Some page visits
5. Create the condition as Page URL contains [URL]
5. Save, Submit, and Publish your container
6. Preview and verify if the event is working
1. Click on Preview
2. Connect the URL where the event is happening to the Tag Assistant
Two tabs will automatically open: your website with the debugger connected and Google Tag Assistant.
3. Under Tags Fired, you should see the event that you've created is fired normally
Once you set up your event, keep in mind that it will take up to 24 hours for the event to register and for Google Analytics to start showing data.
Frequently Asked Questions on Tracking Thank You Page Events in GA4 via Google Tag Manager (GTM)
Can I track multiple Thank You Pages?
Yes, you can track multiple Thank You Pages by creating separate GA4 event tags and triggers for each page or by using a single tag with different parameters based on the page URL.
Can I track multiple forms that lead to the same Thank You page?
Yes, you can track multiple forms by including additional parameters in your GA4 event tag to differentiate between the forms. Determine which forms will lead to the same Thank You page. Each form should have a unique identifier (like an ID or class) that you can use to distinguish them, such as form_id or form_name.
What if users can access the Thank You page without submitting a form?
If users can access the Thank You page without submitting a form, it’s important to differentiate between those who have completed the intended action (like form submission or purchase) and those who might have navigated to the page through other means to avoid inaccurate tracking of conversions in Google Analytics 4 (GA4).
If possible, ensure that the Thank You page URL is unique and cannot be accessed directly without submitting the form. If users can navigate to the Thank You page directly, it may be necessary to implement additional tracking measures. For instance, you can add a verification step and use GTM to check for certain conditions (e.g., a form ID in the data layer) to verify that the user has completed the action.
If the Thank You message is displayed on the same page without redirecting, consider using an Element Visibility Trigger in GTM to track when the confirmation message appears. This ensures that the event is only tracked when the user successfully submits the form.
Why isn't my Thank You Page event appearing in GA4?
If your Thank You Page event is not appearing in Google Analytics 4 (GA4), there could be several reasons for this issue. Possible reasons include:
Incorrect URL or path in the trigger. Verify that the event name and parameters are set up as intended.
GA4 tag not properly configured or published. Use the GTM Preview mode to test if the event fires when you access the Thank You page.
Delay in data processing in GA4. Wait and recheck within 24-48 hours.
GA4 thresholding that hide events with low event counts. Check your reporting identity settings in GA4 and switching from "Blended" to "Device-based" reporting which may help you see more events.
Comments