- 06 Feb 2024
- 7 Minutes to read
Configuring Google Analytics 4 Integration on Google Tag Manager (GTM)
- Updated on 06 Feb 2024
- 7 Minutes to read
Google Analytics 4 (GA4) is an analytics service that helps you have customer-centric measurement and engagement across your websites and apps. The transition from Universal Analytics (UA) to Google Analytics 4 (GA4) is a significant shift in the analytics landscape. GA4 is Google's next-generation analytics platform, designed to provide more flexibility and insights into user behavior across different platforms and devices.
Transitioning from Universal Analytics (UA) to Google Analytics 4 (GA4) is advisable for several reasons:
- User-Centric Focus: GA4 adopts a user-centric approach, providing a more comprehensive understanding of user behavior across platforms and devices.
- Event-Driven Model: GA4 gives you detailed information on what users are doing, thanks to its event-driven approach, which is different from UA's session-based method.
- Cross-Platform Tracking: GA4 is great at bringing together data from websites, mobile apps, and various platforms. It gives you a unified look at how users engage across different devices.
- Machine Learning and AI Integration: GA4 incorporates machine learning and artificial intelligence, empowering you with predictive metrics and insights for informed decision-making.
- Future-Proofing: Google has signaled GA4 as the future of analytics, with ongoing updates and features likely to be focused on this platform. Transitioning early ensures you stay ahead of the curve.
Overall, migrating to GA4 positions you to leverage advanced analytics capabilities and adapt to the evolving landscape of digital measurement.
The following steps describe how to configure GA4 Integration on Google Tag Manager (GTM) to send events to the new Google Analytics for Insider campaign events (e.g. impressions, clicks):
- How to create a tag for GA4 configuration
- How to create an event tag for configuration
- How to observe eventlabel in different groups
- How to check your GA4 integration
How to create a tag for GA4 configuration
1. On the Google Tag Manager panel, select the Tags tab and click New.
2. Under Tag Configuration, in the Choose tag type menu, select Google Analytics - GA4 Configuration to begin your setup.
3. Enter your Measurement ID. To find it, navigate to GA4 panel > Admin > Data Streams > Your Domain.
4. To capture additional data related to specific events you created, you can use custom dimensions. To add custom dimensions, go to the Custom Dimensions section and click the Create custom dimensions button.
5. You'll need to specify the dimension name, scope, description, and event parameter for your custom dimension. Then, click the Save button to start using it. Custom dimensions allow you to collect and analyze additional data alongside your standard GA4 tracking.
6. Select the trigger(s) that will determine when this tag should fire. You can use built-in triggers like "All Pages" or create custom triggers based on specific events or conditions. To create a new custom one, navigate to Triggering and click + (plus) button.
7. Under Trigger Configuration, in the Choose trigger type menu, select Page View to begin your setup.
8. Select All Page Views and name your trigger. Click Save to save your Triggering settings.
9. Click Save to save your configuration. This configuration will provide the connection between GTM and GA4.
How to create an event tag for your configuration
This tag enables you to send your Insider events to GA4.
1. To start with, select the Tag tab. Click the New button.
2. Select Tag Configuration.
3. Select Google Analytics - GA4 Event to proceed.
4. Select the configuration you have newly created in the previous step.
5. Name the event.
Navigate to Settings > InOne Settings > Google Analytics to check the Event name on the InOne panel.
6. Once you've verified the event name, proceed to create the event parameters in GA4, ensuring they mirror the parameters set in the InOne panel. Consistency ensures accurate data mapping, facilitating seamless tracking and reporting between the two platforms. Under Event Parameters, click the Add Row button to create rows.
7. To add a value for the parameter, click + (plus) button.
8. Under Variable Configuration, in the Choose variable type menu, select Data Layer Variable to begin your setup.
9. Assign a name to your variable, and make sure it matches the one specified in the InOne panel.
Navigate to Settings > Inone Settings > Google Analytics to check the Event Category name on the InOne Panel.
10. Save your changes.
11. It would look as follows when you finalize the configuration.
12. You can add a Trigger to determine when this tag should fire when you click Triggering.
13. Select custom event and use the same event name as it is on the InOne Panel.
14. Save your changes and finish integration.
Now that you have finalized this integration, you can start gathering data to measure your marketing results and meet your customer needs accordingly.
How to observe eventlabel in different groups
Since it is the campaign data, you don't need to do something different to get the eventlabel for Variation Group, Control Group or the event you set.
- For example, you can see the eventlabel of the variation group below on a visible campaign.
- You can see below the eventlabel of the control group when the campaign is not visible to the user.
- In the example below, you can see a GA event added via template, which is shop_now_clicked.
- In the example below, you can see the close click event data.
How to check your GA4 integration
You can check the steps below to understand if you have configured GA4 integration successfully.
1. Firstly, to determine which GA4 account you are in, you can extract the tid from the requests that contain the Insider event in 'collect?v' requests, similar to checking in Universal Analytics. The crucial point here is that the tid should start with 'G-'. In GA4, you look for an ID starting with 'G-', while in Universal Analytics, you look for an ID starting with 'UA-'.
2. Check whether a GA4 Configuration has been created within Google Tag Manager. In this step, verify if the Config file created includes the correct Tag Configuration, Measurement ID, and the Trigger for Page View.
To ensure the correct Measurement ID has been added, you can go to the Admin section on the Analytics page and check the Web Streams Details within Data Streams.
Check within the Trigger Configuration that 'Page View' is selected and ensure that 'All Page Views' is also selected.
3. After these steps, verify whether Insider events have been correctly added and check if the Event integration in Tag Configuration has been set up correctly.
The crucial point here is that 'INSIDER' should be added in the Event Name field.
The value within {{}} curly brackets should match the name of the event file added in the Variable file.
4. Check that the Event Parameters added in the Event integration are correctly included in the Variable file.
One of the crucial points here is that the version should be Version2.
Also, check that the integration of Insider events in the GTM setup matches how it's done in the InOne panel and Data Layer Variable Name.
5. You need to manually add these events to Custom Definitions in the GA4 admin panel.
6. If you have done everything correctly up to this point, after publishing your integrations, you should be able to see Insider events in 'collect?p' requests or by writing 'datalayer' in the Console.
How to check your campaigns
If the above steps are correct, you can see 'Insider' events when you search under Life Cycle > Engagement > Events in the Reports page.
If you want to view it on a campaign basis, you can check by adding the custom events you added using the + (plus) button.
You can view products checked with the UTM parameter (web_push, email, etc.) under Acquisitions in User Acquisitions within First Source/Medium.