- 06 Feb 2024
- 2 Minutes to read
Sending Insider Events to Google Analytics via Google Tag Manager (GTM)
- Updated on 06 Feb 2024
- 2 Minutes to read
The following steps describe how to use Google Tag Manager (GTM) to send events to Google Analytics for Insider campaign events (e.g. impressions, clicks):
- Define a trigger
- Create variables for universal analytics tag
- Create a universal tag to send events
- Preview and publish
- Understand if you made the Google Analytics integration successfully
Define a trigger
1. Define a Trigger to fire events from the data layer to Google Analytics.
2. On the Choose trigger type menu, select Custom Event to begin your setup.
3. Rename your trigger and your event as INSIDER. Save your trigger.
Create variables for universal analytics tag
1. Select the Variables tab. Select New in the User-Defined Variables section.
2. In the Choose variable type menu, select Data Layer Variable to begin your setup.
3. Rename your variable and data layer variable as eventaction. Save your changes.
4. Create a second variable. Select the Variables tab. Select New in the User-Defined Variables section.
5. In the Choose variable type menu, select Data Layer Variable to begin your setup.
6. This time, rename your variable and data layer variable as eventlabel. Repeat the same steps to create eventcategory variable. Save your changes.
Create a universal tag to send events
1. Select the Tag tab. Select New.
2. In the Choose tag type menu, select Google Analytics - Universal Analytics to begin your setup.
3. Rename your tag as GA Events - Insider and choose Event as the Track Type.
4. Complete the marked fields (Category, Action, Label, Non-Interaction Hit, Google Analytics Settings) as shown in the image below.
5. Create a new variable. Name it and add your Tracking ID.
- Sign in to your Analytics account.
- Navigate to Admin.
- Select Account from the menu in the ACCOUNT column.
- Select Property from the menu in the PROPERTY column.
- Under Property, click Tracking info > Tracking Code.
- Your Tracking ID is displayed on the top of the page.
6. Choose INSIDER as the trigger. Make this tag fire. Save your tag.
Preview and publish
1. Click Preview on the top bar to test your events.
2. Make sure all your events fire correctly before publishing your version.
How to understand if you made the Google Analytics integration successfully?
If you applied all the steps, first you need to check Chrome network tab to see if there is a request for events you want to send to Google Analytics:
If you can see the events in the network, you can make sure that you have made the integration correctly.
Also, you can check the “events” if there is an active campaign on the specific page: