to the tippy ↑

Google Analytics

At Wistia, we love analytics. While ours are pretty sweet, there are lots of tools out there, like Google Analytics. While Wistia's analytics give you more in-depth information on video plays, putting basic video metrics in Google Analytics can give you a better picture of how they tie together with your website's metrics.

This guide is here to help you get started integrating Wistia video tracking with your Google Analytics account.

Before You Get Started

Make sure you have installed the Google Analytics tracking scripts. These are necessary for any custom tracking we do below.

If you currently have the pre-Universal Analytics version of Google Analytics setup, we recommend checking out the Universal Analytics Upgrade Center to get all the info you need to know about converting to the shiny new Universal Analytics style of things.

Default Configuration

Wistia automatically publishes the basic video metrics listed below to your Google Analytics account. If you have multiple Wistia videos on the page, each video will have its own set of metrics in Google Analytics. Our integration also works with Universal Analytics, so no worries about compatibility issues there unless you've changed to a custom analytics variable other than ga or _gaq.

  • Play
  • 25% watched
  • 50% watched
  • 75% watched
  • 100% watched
  • Turnstile email conversion

You can disable our integration for all your videos by default by changing the configuration on the Account Settings page. You can also disable the integration for an individual video by modifying the initialization parameter for an API embed: Wistia.embed("8cexf3sjf3", { "googleAnalytics": false });.

Google Tag Manager

If you also use Google Tag Manager in addition Google Analytics, there are a few extra steps you need to complete. Tag Manager acts as a middleman in front of the webpage and doesn't allow any videos to send data directly to Google Analytics. In order for Wistia to publish events to Google Analytics, data must be sent to a data layer managed by Tag Manager. Then, this data layer uses two Tags in your Tag Manager account to publish events to Google Analytics.

First, create 3 Data Layer Variable Macro:

Then, create a Page View Tag:

Then, create an Event Trigger Tag:

Lastly, add a Firing Rule to the Event Trigger Tag:

The tracking parameters are: wistiaEventCategory, wistiaEventAction, wistiaEventlabel, and the Firing Rule event is wistiaTriggerEvent. Make sure you label the event tracking parameters with the exact spelling and capitalization. Once you've completed the above steps, video metrics should publish directly to your Google Analytics account through Tag Manager.

Track viewing in Google Analytics Dashboard

Now that we have all the back-end coding out of the way, it's time to monitor how the videos are performing on your Analytics Dashboard.

The first step is to navigate to the Event Tracking section. Click the "Behavior" area of the left hand nav bar, and then select "Events" from the list. The Events section will show the total number of events, the average number of events per visit, and the Top Events. The easiest way to get to the specific stuff is by the "Top Events" view, pictured below.

Depending on how many types of events you have in your installation, you may see a lot of things here. By default all ours use the "Video" type, so let's look into that category of events.

In here, you'll see a list of the events available to you, which are the things that we push using the stuff we covered earlier. There are some defaults included, but here's where your custom events would also appear if you configured any. The default events are: played, 25% watched, 50% watched, 75% watched, 100% watched, and conversion.

Let's take a look at the data for the "play event" for this case. You'll see here that this data comes in the form of video titles, which is a way to see in your analytics dash which of your videos got events for being played (the same is true for the other events). Below is an example of what that looks like.

Using Wistia and Google Analytics is a good way to get all your top-level video analytics data in the same place you already get your other website tracking information. The screenshots above may not be exactly like you see, since there are a few different versions of Google Analtics, Universal Analytics, etc.