Step 1: Add the tracking script to your site
You’ll need to add our custom script that translates events from the Vimeo player into Google Tag Manager events. Log in and head to https://vimeo.com/settings/. Under the Marketing tab, you’ll see a tracking code at the bottom, and instructions on how to add the script to the pages you’d like to track.
Step 2: Create Variables for Vimeo events
On your Google Tag Manager account, create a new user defined variable under the “Variables” section of GTM for each of the following data layer values:
- event_category (always ‘Video’)
- event_action (one of the events listed in step 3)
- event_label (Video title + video ID. Eg: “My Vimeo Video | 78934”)
If you already have variables set up for these data layer values you may reuse those instead.
Step 3: Create Triggers for Vimeo events you need to track
Create a new trigger for any of the player tracking events we provide.
The image below is an example of a trigger that tracks play events. You may also track any of the following events:
- loadprogress - 25%
- progress - 50%
- progress - 75%
- progress - 100%
Step 4: Connect your triggers to any of your GTM tags
With variables and triggers set up for all Vimeo events, you can now tie them into your actual tracking services, like Universal Analytics. The following screenshot is an example of how you can tie the play trigger to a Universal Analytics event.
Triggering (note: this is the trigger we created in the previous step)