YouTube Video Tracking
Tracking YouTube videos is now handled seamlessly with an add-on library from ConversionRuler.
Tracking YouTube Videos requires the following:
- Your site must use the jQuery library on the pages in question
- ConversionRuler currently supports tracking of iframe YouTube videos only (this is the modern version)
- To track old-style YouTube videos, employ the technique for tracking Flash
How to implement
- Install ConversionRuler Tracking normally on your site.
- If jQuery is already being used, add the following script after jQuery is loaded:
- If jQuery is not being used, add this line to the top of your page, before the youtube.js script above:
- Edit your sites actions to add the following actions (You can use custom names - see below):
- "play" - When a video is played by the user
- "pause" - When a video is paused by the user
- "seek" - When a video is seeked by the user
- "end" - When a video reaches the end
- YouTube videos will now be tracked using the named actions as described below
How actions are tracked
Actions are tracked with the following parameters:
- First text field: Full URL of video
- Second text field: ID of video (e.g. UJ53Js0YKZM)
- Third text field: Seconds offset in the video where the action occurred
Using alternate names for actions
The above code will map each action on the left to the new action on the right. So when the play button is recorded, the action "yt-play" will record with ConversionRuler.
Feature added August 19th, 2013 at 6PM Eastern Daylight Time.