Wistia Tracking Plugin for Google Analytics & Google Tag Manager


We’re rolling out a new plugin to complement our suite of Google Tag Manager recipes. The latest addition targets the popular video-hosting platform Wistia. 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 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:

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

IMPORTANT: By default, if Wistia detects that Google Analytics is installed on the page, it will already send events to your account. If you’re using hard-coded Google Analytics, this might be just fine for your use case – however, if you’re using GTM, you must add the class ‘googleAnalytics=false’ to your embed code, as seen in our example below. In our tests, every tracker is dispatched a hit when a Wistia automagic event goes out – if you’re using GTM, you’re almost certainly over-reporting on these events, as GTM creates a new tracker for every hit sent on the page.

To see our plugin in action, play the video below. Events will appear in the textarea 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 wistiaTrack events.

If you’re curious about Wistia’s Player API, check out their documentation. Having built similar plugins the past, we feel their simple command-queue style syntax is a breeze to work with. We also love that they support applying a command to all videos without having to watch for them to load or iterate through on-page elements. Huge kudos to the Wistia team for designing such a pleasant API to work with.

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.

Dan Wilkerson is a Software Engineer at LunaMetrics. 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.

  • Oscar

    How necessary is this implementation since on the Wistia Help page they claim that nothing needs to be done, unless we DON’T want to track the events, even when using GTM?

    • Dan Wilkerson

      Read my note under “IMPORTANT” – Wistia’s implementation is borked.


  • David Hermann

    Im constantly reading this blog and I just want to say thank you. All the articles and especially the gtm recipes are super useful.

Contact Us.


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

Follow Us




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