Learn setting up Google Tag Manager (GTM) for tracking events. You'll learn how to create a trigger, configure a tag, define custom variables, and publish changes to the system.
In this article:
Step 3: Create custom variables
Step 4: Add custom variables to the GA tag
Step 6: Add your GA and GTM IDs to the apps
Step 1: Create the Trigger
1. Click on the Triggers menu item, and create a new Trigger.
2. Name your trigger Video Start Trigger and pick Custom Event as the trigger type.
3. Use video_start as the event name. Save this trigger.
Step 2: Create a new tag
1. Click Tags > New.
2. Enter a name for the GA4 Event tag at the top (e.g., "GA4 Event - Video Start").
3. Click on Tag Configuration > Google Analytics > Google Analytics: GA4 Event.
4. Add your Measurement ID and set the event name to video_start
.
5. Click on the Triggering section and pick the Video Start trigger which was created earlier.
6. Save this Tag.
Step 3: Create custom variables
1. Click on the Variables menu item and in the User-Defined variables section create a new one.
2. Name it Event Model and from the Variable Configuration section select Data Layer Variable.
3. Use eventModel
as Data Layer Variable Name, then save this variable.
4. Repeat the same process for 3 more variables:
a. Event Title - eventTitle
b. Event Source - eventSource
c. Event Type - eventType
Step 4: Add custom variables to the GA tag
1. Select GA Event - Video start tag which you created earlier.
2. In the Tag Configuration section add custom variables as Event Parameters. Save this tag.
Step 5: Publish your changes
Click on the Submit button and publish changes.
Step 6: Add your GA and GTM IDs to the apps
1. In the Ravnur Admin Portal, from the Configurations page.
2. Add your Google Analytics ID (Measurement ID) and Google Tag Manager ID, then press Save.
3. You can find your Google Tag Manager ID from the tag manager dashboard: