Track YouTube Videos As Events

By adding a TrenDemon pixel to a video player, you will be able to track visitors who viewed the video and see which what goals they subsequently completed.

Use Case: Let’s say that you run a video on your home page and the goal you are tracking is “requesting a demo”. You can track the video on the home page and see in your TrenDemon report how many visitors who viewed the video also requested a demo after doing so.

In the following post, you will find a tutorial on how to add TrenDemon’s pixel to a YouTube video.

Note: In order to track a YouTube video that is played on your website, you should also use the YouTube Player API.

Here are the steps:

1) When you embed a YouTube video as an <iframe> element, make sure that either the player’s src URL includes the enablejsapi parameter = 1 or the <iframe> element’s enablejsapi attribute is set to “true”. Example: