How to track WordPress video play events with Google Analytics

This tutorial will show you how to track WordPress video play events with Google Analytics.

There are 4 steps in this tutorial:

  • Step 1 - Install the WordPress plugin Wonder Gallery
  • Step 2 - Create a video player or video gallery with Wonder Gallery
  • Step 3 - Add Google Analytics Tracking ID to the gallery
  • Step 4 - View WordPress video play events in Google Analytics

Step 1 - Install the WordPress plugin Wonder Gallery

First please install Wonder Gallery in your WordPress. Wonder Gallery is a WordPress video gallery plugin to play videos in WordPress. You can download the free version from the product homepage, try it, make sure it works for you before upgrading to the commercial version.

wordpress gallery home

For how to install a plugin from the downloaded plugin ZIP file, please view this tutorial: How to install a WordPress plugin from a ZIP file.

Step 2 - Create a video player or video gallery with Wonder Gallery

After you have installed Wonder Galley, in your WordPress dashboard, goto left menu Wonder Gallery -> New Gallery, create a new gallery.

In the gallery editor, step 1, you can add HTML5 videos, YouTube, Vimeo, DailyMotion and iframe Videos (for example Wistia videos) to the gallery. You can also create a YouTube playlist gallery which will automatically update when new videos are added to the YouTube playlist.

wordpress gallery

Add Videos to the Gallery - click to enlarge the image

Step 3 - Add Google Analytics Tracking ID to the gallery

In the gallery editor, step 3 Options tab, click Gallery Options on the left, at the bottom of the right options panel, enter your Google Analytics tracking ID to the input box Google Analytics Tracking ID.

Google Analytics tracking ID is something like UA-000000-01. To find your Google Analytics tracking ID, please view: https://support.google.com/analytics/answer/1032385?hl=en.

Step 4 - View WordPress video play events in Google Analytics

To view the logged video play events, in your Google Analytics dashboard, click left menu Behaviour -> Events -> Top Events. The event category is Video.

google analytics top events

View Google Analytics Events - click to enlarge the image

If there are images in the gallery, the plugin will also track the image viewing events. The event category in Google Analytics dashboard is Image.