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

Continue reading

DailyMotion WordPress Video Gallery


WordPress Gallery


When searching for a WordPress plugin Embedded Video player that supports Dailymotion, your site always comes up as being DailyMotion compatible. How do I display videos which I have on my DailyMotion profile?


Our plugin WordPress Gallery supports DailyMotion.

1. In your DailyMotion video page, click the link Export, then copy the Permalink.

2. In WonderPlugin Gallery, step 1, click the button Add DailyMotion, enter the link and add the DailyMotion to the video gallery.

DailyMotion WordPress Gallery

Only 5 videos in YouTube playlist gallery


WonderPlugin Gallery Plugin


I'm very interested in the YouTube playlist gallery you offer. I have tested it out and I love the functionality but I also noticed there is only 5 videos from each playlist I can scroll through. I was wondering if there is a way to include all the videos from a given playlist?


In the "Add YouTube Playlist" dialog, enter a large value, for example, 50, to the field "Maximum results (optional, default is 5)".

If you don't enter any value, it will only get 5 videos from the Youtube playlist.

Link to a specific video in WordPress Video Gallery


WonderPlugin Gallery


Great plugin first off! Love it. We are using the media skin and everything works great. We have about 20 videos in the gallery. The question is, we have links to videos from other pages but it doesn’t load that specific video and so the users have to find the video. Is it possible to properly form the link so it loads the video or is this not possible?


You can use a URL parameter html5galleryid to specify a slide on page loading.

The parameter starts from 0. For example, the following URL will load the third slide on page loading:

Callback from WonderPlugin Gallery when a video is changed


* This question is for WonderPlugin Gallery Plugin.

I’d like to know if there is a way to get a call back from WonderPlugin when a video is changed in the gallery, this is to show related content to that specific video within the playlist.


There are two events you can use:

onchange: The event will be be fired on changing the slide.
onvideoend: The event will be be fired when the video playing ends.

To use the events, firstly, you need to define a JavaScript function in your webpage, for example:

<script language="JavaScript">
    function onSlideChange(data) {
        try {
        } catch (error)   {}
    function onVideoEnd(data) {
        try {
        } catch (error)   {}

In the above code, data is the data array of current slide object, the definition is [index, Thumbnail address, File address, File address for video ogg file, Fire address for video webm file, Link address, Link target, Title, Description, Media type, Width, Height, Address for video poster image, Address for HD video, Address for HD Ogg file, Address for HD webm file].

Then in the plugin, Step 3, Options tab, Advanced Options, enter: