One of the disadvantages of self-hosting video and audio files, like music, podcasts, etc., as opposed to services like YouTube and Vimeo, is that you are missing out on their analytics capabilities.
Tracking media files used to mean writing custom code, but as of version 2.3.2 of WP Google Analytics Events Pro, you can start tracking your self-hosted media files by checking a few boxes.
Media tracking allows you to know how many video or audio plays you had on your website, how many visitors finished watching the videos, and if not, see the average engagement duration.
Both Videos and Audio files are now trackable from the plugin’s “Media” tab. For each media option (video and audio), you can check the following boxes:
- Play – An event will be sent to Google Analytics every time someone clicks the play button.
- Pause – An event will be sent when the video is paused.
- Ended – Fires when the video ends
- Duration – Will fire an event on set waypoints through the video
How will the events look like on Google Analytics?
The event structure for Play, Pause, and Ended are the same in the form of:
Category – Video
Action – Play / Pause / Ended
Label – The file name. For example, my-amazing-podcast-s01e15.mp3
Duration tracking is a little different, and the Action will reflect the position in 20% increments. If someone watches the video from start to finish, you will receive 5 events in which the Action field will be:
Duration – 20%
Duration – 40%
Duration – 60%
Duration – 80%
Duration – 100%
You can use these metrics to understand which videos resonated well with users and which ones people ended early.