Integration with Google Analytics

This guide explains how to enable and use built-in Google Analytics features with the JW Player. GA integration is supported in all versions of JW Player 8, including Free.


JW Player's own analytics are a great way to see how customers are consuming video. However, for more targeted video playback information, JW Player supports direct integration with Google Analytics. All playback events will populate inside of the Event Category called JW Player Video. A list of default Event Actions are included here:

JW Player Video Events
Video Plays
Video Completes
Buffer events
Idle events
Pause events
Resume events
Seek events

These categories can be found in your Google Analytics dashboard under Behavior > Events or Real-Time > Events.


Event Properties

If a Category link is clicked, we can view actual Event Actions which were captured by the player.

Accessing the JW Player Video category will provide the following playback information:

  • Event Action — This is the event captured by the player. For example, Play, Buffer, Complete, etc.
  • Event Label — By default, the URL of the video file which was played.


Supported Versions of Google Analytics

The use of the deprecated ga.js is no longer officially supported with JW8, so we do highly suggest moving to analytics.js if possible. In the event that you are using both analytics.js and the older ga.js on your page, we will use analytics.js exclusively for sending events and ignore any older ga.js code. More information about upgrading from ga.js to analytics.js is available on Google's site here.


Setting up your GA

JW Player will leverage the implemented GA script from the page that it is embedded on. Therefore, an active account with Google Analytics is required to utilize this feature. After configuring your analytics.js script and player on a web page, we will track events based on your unique Google Analytics account number. (This number resembles UA-XXXXXX-X)

A properly-implemented analytics.js script would look like the following within your page head:

  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),

  ga('create', 'UA-XXXXXXXX-X', 'auto');
  ga('send', 'pageview');


In the JW Player dashboard, you can enable Google Analytics with just a click, on any of your existing or new players. To visit the configuration option, go to Players > Manage on the left sidebar of the dashboard and then click on the name of the player you would like to enable the integration for.

Google Analytics toggle in the player detail page

Note: You'll need to make sure you've placed the GA tracking code on your website before your JW Player activity will appear. (See above).


Did you find this article helpful?

Please log in to rate this article.