How To Verify & Debug Your Server-Side Tracking Setup
GA4 server-side tracking is a method of collecting website and app user interaction data on a server instead of a user's browser (client-side tracking). This shift brings several crucial benefits in today's digital landscape. Below are a few of the important benefits of server-side tracking.
More Reliable Insights: Accurate data leads to better decision-making. You can confidently analyze user behavior, marketing campaign performance, and website optimization efforts.
Regulatory Compliance: Server-side tracking empowers you to protect user privacy and comply with data protection laws more effectively.
Improved User Experience: Faster websites lead to happier users and potentially increased conversions.
Customizable Tracking: Tailor your tracking setup to meet specific business needs and integrate with various tools seamlessly.
In this article, I will guide you through the process of verifying your server-side tracking when implemented using AdPage.
The first step is to verify the dataLayer is properly integrated on the website. This is a crucial step for integrating server-side tracking.
To do this, you can simply use the dataLayer Checker chrome extension or console. Once the extension is installed, open your website and click on the extension. It will show you the tags and dataLayers installed on your website.
trytagging_user_data is an important dataLayer event and should fire on all pages of your website. This includes basic marketing data. If you’re missing this, your server-side tracking won’t work properly.
You can also check this in the console as shown in the screenshot above.
In your GTM web container, verify that your GA4 config and page view tags fire on the trytagging_user_data event. This ensures the tags firing before any other event on your website and properly attributes traffic sources in your GA4 accounts.
You can also verify this by using the GTM preview mode.
Next using the same preview mode, open the config tag to verify the parameters data is passing correctly.
Any other event you’re tracking should fire after the page view and config tags.
Navigate through your website and verify all the implemented events firing correctly with proper event parameters data.
Make sure the correct GA4 measurement id added in GTM matches with that in GA4. This is very important and sometimes we mistakenly add a different ID in GTM which leads to data being sent to an incorrect GA4 account.
Open Google Tag Manager web and server container and Navigate to Versions > View Version History > Review Published Versions (old and new) > Inspect Version Details > Check which changes are happening in that version
In server GTM you have to check all the events are coming in server GTM preview with correct information and tags are firing successfully
Make sure client_id, ga_session_id, ga_session_number those parameters for all events are matching with our dataLayer user_id, session_id, seassion_count, data
NB: This only need when we used webhook
The last step is to verify your webhooks work correctly. To do this, open GTM server preview mode and click on the three vertical dots on top right and click send requests manually.
Next copy the server preview header and login to your trytagging account.
In your try tagging account navigate to optimisation and click get started under the preview header.
Now when you place a test order on the website or a live order is recorded you will be able to see the order_created event in the preview mode and the GA4 purchase tag should fire on this event.
By following these steps, you will be able to verify the server side tracking for your Google Analytics 4 account.
More Reliable Insights: Accurate data leads to better decision-making. You can confidently analyze user behavior, marketing campaign performance, and website optimization efforts.
Regulatory Compliance: Server-side tracking empowers you to protect user privacy and comply with data protection laws more effectively.
Improved User Experience: Faster websites lead to happier users and potentially increased conversions.
Customizable Tracking: Tailor your tracking setup to meet specific business needs and integrate with various tools seamlessly.
In this article, I will guide you through the process of verifying your server-side tracking when implemented using AdPage.
Client Side Testing:
1. Verify DataLayer Setup on the Website:
The first step is to verify the dataLayer is properly integrated on the website. This is a crucial step for integrating server-side tracking.
To do this, you can simply use the dataLayer Checker chrome extension or console. Once the extension is installed, open your website and click on the extension. It will show you the tags and dataLayers installed on your website.
trytagging_user_data is an important dataLayer event and should fire on all pages of your website. This includes basic marketing data. If you’re missing this, your server-side tracking won’t work properly.
You can also check this in the console as shown in the screenshot above.
2. Verify Page_View & Config Tags Firing on trytagging_user_data event
In your GTM web container, verify that your GA4 config and page view tags fire on the trytagging_user_data event. This ensures the tags firing before any other event on your website and properly attributes traffic sources in your GA4 accounts.
You can also verify this by using the GTM preview mode.
3. Verify Parameter Data
Next using the same preview mode, open the config tag to verify the parameters data is passing correctly.
Any other event you’re tracking should fire after the page view and config tags.
4. Test all events Firing Correctly
Navigate through your website and verify all the implemented events firing correctly with proper event parameters data.
5. Cross Check GA4 Measurement ID
Make sure the correct GA4 measurement id added in GTM matches with that in GA4. This is very important and sometimes we mistakenly add a different ID in GTM which leads to data being sent to an incorrect GA4 account.
6. Check Version Management in GTM
Open Google Tag Manager web and server container and Navigate to Versions > View Version History > Review Published Versions (old and new) > Inspect Version Details > Check which changes are happening in that version
Server-Side Testing
Verify Events & Parameter Data
In server GTM you have to check all the events are coming in server GTM preview with correct information and tags are firing successfully
Make sure client_id, ga_session_id, ga_session_number those parameters for all events are matching with our dataLayer user_id, session_id, seassion_count, data
NB: This only need when we used webhook
Verify Webhook Working Correctly
The last step is to verify your webhooks work correctly. To do this, open GTM server preview mode and click on the three vertical dots on top right and click send requests manually.
Next copy the server preview header and login to your trytagging account.
In your try tagging account navigate to optimisation and click get started under the preview header.
Now when you place a test order on the website or a live order is recorded you will be able to see the order_created event in the preview mode and the GA4 purchase tag should fire on this event.
By following these steps, you will be able to verify the server side tracking for your Google Analytics 4 account.
Updated on: 09/10/2024
Thank you!