This feature requires a Business, Premium, Advanced, or Enterprise membership.
As a Vimeo user, you can use Google Analytics to track events on all Vimeo players embedded on your site, except for Vimeo Live. Google Analytics is not available to Vimeo live players.
You can find instructions for installing Google Analytics via Google’s Tag Manager at 'Google Support: Deploy Universal Analytics with Tag Manager. The tracking code triggers Google Analytics events for plays, impressions, contact forms, and when the progress through a video embedded on your site hits 25%, 50%, 75%, or 100% complete.
You can find more information at the Google Analytics Help Center and the Google Tag Manager Help Center
In this article:
- How to add the Vimeo tracking script to your site
- Confirm that the Vimeo tracking code has been installed properly
- User-defined variables and triggers
- More information
How to add the Vimeo tracking script to your site
- Go to the Marketing tab in your Vimeo Account Settings.
- Copy the tracking code below the Google Analytics heading.
- Paste this tracking code underneath the Google Analytics script wherever it appears in the HTML source code of your website.
💡Tip: If you are unable to modify your website’s HTML code, you can also to inject the tracking code into your website using Google Tag Manager:
- Go to the Google Tag Manager workspace for your site.
- Next, go to Triggers from Tag Manager’s main Workspace menu.
- Click New.
- Choose Trigger type DOM ready under Page View and set it for all events.
- Save your changes.
- Now click on Tags from Tag Manager’s main Workspace menu.
- Click on New.
- Under Tag Configuration, choose the Custom HTML tag type.
- Insert your unique Vimeo tracking code into the HTML box.
- Under Triggering, select the DOM Ready trigger created in previous steps.
⚠️Note: If you have a more advanced setup that adds new embeds to the page after the initial load (for example, if using a lightbox or pop up player), you'll need to either call the function window.__vimeoRefresh() in the script used to load your iframe embeds, or you can insert this custom script into your webpage's source code beneath the Vimeo GA script:
<script>setTimeout(function(){ window.__vimeoRefresh(); }, 3000);</script>
You can insert this script using GTM within the same tag used to trigger your Vimeo GA tracking script, as shown here:
Confirm that the Vimeo tracking code has been installed properly
- First go, to Google Tag Manager and click on the Preview button to enter Preview Mode.
- Navigate to the site you've set the tracking code on. There, you'll see the Google Tag Manager console. You can verify this by confirming there are Vimeo entries under the Summary section, as well as by clicking on the Data Layer tab within the console itself to verify the existence of Vimeo events.
⚠️Note: If you’re not seeing the debug window when accessing your webpage, please make sure you’ve properly installed Google Tag Manager in your website.
User-defined variables and triggers
Once you've confirmed that the Vimeo tracking code has been installed, we recommend following Google's guidance on creating user-defined variables and triggers to track your events.
The following specifications may be helpful for creating variables and triggers:
Variable settings
- event_category: Video
- event_action (values must be lowercase and match the formatting below):
- load
- play
- progress - 25%
- progress - 50%
- progress - 75%
- progress - 100%
- emailcapture
- event_label: Video title + video ID. Eg: "My Vimeo Video | 78934"
Trigger settings
- Trigger type: Custom Event
- Event name: vimeo (value must be lowercase)
More information
A few more technical details to keep in mind about the integration with Google Analytics:
- The script will work with universal analytics, classic analytics, and Google Tag Manager only if the tracking libraries are defined as ga for universal, _gaq for classic, or dataLayer for Google Tag Manager.
- If you use the script, please do not add the Vimeo player API (https://player.vimeo.com/api/player.js). If you need functionality from that library, you should put the code after the Google Analytics tracking script.