Vimeo Tracking Plugin for Google Analytics & Google Tag Manager

/

vimeo-plugin-ga-gtm
We’re rolling out a new plugin to complement our suite of Google Tag Manager recipes. The latest addition targets the popular video-sharing platform Vimeo. Just like our YouTube Tracking plugin, this library allows you to track Play, Pause, and Watch to End events, as well as track when the user has viewed past specific percentages of the video.

You can find our complete documentation (and a handy link to download a container file with the plugin) here. If you’ve never imported a container into Google Tag Manager before, check out this handy guide from my colleague Jim Gianoglio.

The default settings will track Play, Pause, and Watch to End events, as well as when the user views past the 10%, 25%, 50%, 75%, 90%, and 100% marks. Currently, it has been tested and shown to work in the following browsers:

  • IE10+
  • Edge 14
  • Chrome 57
  • Firefox 52
  • Opera 44
  • Safari 10
  • Yandex 14

To see our plugin in action, play the video below. Events will appear in the textbox beneath as they are tracked.



Here’s the HTML of the above:

For our demo, a Custom HTML tag is fired in GTM to append the event to the textarea on this page. It is triggered by vimeoTrack events.

If you’re curious about Vimeo’s Player API, check out their documentation. Vimeo’s Player API wasn’t a huge chore to work with, but be aware that video metadata is loaded asynchronously after the video itself. To run event bindings after video metadata is loaded, make use of the ‘Player.getVideoTitle()’ method. This method returns a ‘Promise’-like object, which you can then call ‘.then(callback)’ on and run the rest of your bindings with the required data in hand.

Ready to get started? Head over to our recipe page and download the plugin. If you’d like to contribute or discover a bug, submit a pull request on our GitHub repository.

Though really a Palmyra, PA expat, Dan insists he's a "non-native" 'Burgher. Approaching social early, then marketing, exigencies of native targeting soon entangled him in numbers. Dan is happy to have ended up living in Pittsburgh and (accidentally) as a self-taught and avid programmer.

  • Vaibhav Raut

    Awesome. This is like a GTM cheat code.

  • Sam

    Aah, yes! I’ve been waiting for this one 🙂

    One question, though… I’ve been using your YouTube plugin for a while. In that script, you save the video URL, opposed to the video name for Vimeo and Wistia.

    Is there a quick/easy way to save the video name in the YouTube script, or the URL in the Vimeo/Wistia script? That way I could standardise across the three video platforms (I have one event category ‘video’ so that interactions for all my videos are bundled under one category (since play, pause, watch to end and the percentages are all the same).

    Thanks!

    • Dan Wilkerson

      Hi Sam,

      Not really, regarding YouTube. The API does *sometimes* ship with a .getVideoData() method which returns a title, but Google has come and and said that it’s not officially supported and we found it wasn’t reliable in testing.

      You might be able to tweak it to pull off the URL, but currently it doesn’t support that behavior. It’d be great to have that added as a configuration option – we’d love a PR on our Github repository!

      Dan

Contact Us.

LunaMetrics

24 S. 18th Street, Suite 100,
Pittsburgh, PA 15203

Follow Us

1.877.220.LUNA

1.412.381.5500

getinfo@lunametrics.com

Questions?
We'll get back to you
in ONE business day.