How to Pass Vidalytics Video Watch Data to Google Analytics and Google Tag Manager
Integrating Google Analytics with Vidalytics
Connecting Google Analytics
Restrictions: Our marketing integrations are available starting on the Pro plan and above. Facebook and Google Manager Integrations are included starting on the Starter Plan.
Step 1: Install the Tracking Code
You need to install the appropriate tracking code on the page where the Vidalytics player is embedded.
For Google Analytics via Google Tag Manager (GTM):
Replace GTM-XXXXXXX with your container ID.
For Universal Analytics (gtag.js):
Replace UA-XXXXXXXX-X with your Google Analytics property ID.
For Google Analytics 4 (GA4):
If you have set up Google Analytics 4 from scratch, follow the same steps as above but replace UA-XXXXXXXX-X with GTM-XXXXXXX in your tracking code.
If you are using Universal Analytics and want to send data to Google Analytics 4, add the following line:
Step 2: Enable Google Analytics Integration in Vidalytics
-
Go to your Vidalytics account and enable Google Analytics integration.
-
Select the player events you want to track:
-
Play
-
Pause
-
Pause Percentage
-
Watched Percent (25%, 50%, 75%, 99%)
-
Play Gate Submit
-
-
Important: Republish your video(s) after enabling the integration.
Step 3: Configure Google Tag Manager (Optional)
If you are using Google Tag Manager, follow these additional steps:
Create User-Defined Variables
-
Go to Variables > User-Defined Variables > New.
-
Set the variable type to Data Layer Variable.
-
Enter
videoTitleas the Data Layer Variable Name. -
(For Pause Percentage tracking) Create another variable named
value.
Create Triggers for Each Event
-
Go to Triggers > New.
-
Choose Custom Event as the trigger type.
-
Configure it for each player event you want to track.
Create Tags for Google Analytics
-
Go to Tags > New.
-
Select Google Analytics: GA4 Event.
-
Configure it for each event, ensuring Pause Percentage includes an additional
valueparameter.
Step 4: Test the Integration
Using Google Tag Manager Preview Mode
-
Click Preview in Google Tag Manager.
-
Enter your website's URL.
-
Play the video and check the Data Layer events in the left sidebar.
Register Custom Definitions in Google Analytics 4
-
Go to Configure > Custom Definitions.
-
Click Create Custom Dimensions.
-
Add the following:
-
Dimension Name: Any name you choose.
-
Scope: Event.
-
Event Parameter: Enter the parameter exactly as used in GTM.
-
-
Save the dimension.
Note: If you want to also send the video watch data from Google Tag Manager to Universal Analytics, you'll have to create an additional user-defined variable:
Step 5: Check Your Data in Google Analytics
Google Analytics 4
-
Real-time Events: Go to Reports > Realtime.
-
Event Table: Check in Configure > Events.
-
Debug Mode: Go to Configure > DebugView.
Universal Analytics
-
Real-time Events: Check events immediately in the reports.
-
Total Events Report: Updates within 24 hours.
-
Detailed View: Click on the "Video" category for more insights.
Step 6: Track Goals in Universal Analytics
To track goals based on video watch time:
1. Set the goal type as Custom.
2. Add a title and select Event as the goal type.
3. Configure goal details:
-
Category:
video -
Action:
Play,Pause,Pause Percentage, or specific watch percentages (e.g.,30% watched). -
Label: The title of your video.
-
Value: (Only for Pause Percentage tracking, e.g.,
35for 35% pause).
4. Save your goal.
You’re all set! 🎉 Now your Vidalytics video data is successfully integrated with Google Analytics, enabling you to track engagement and optimize performance. 🚀
If you have questions, feedback, or need assistance, contact our Customer Happiness Team at hi@vidalytics.com. 😊