YouTube Video Tracking Plugin

Use this JENTIS Tag Manager plugin to track how users interact with embedded YouTube videos. The plugin captures events such as play, pause, and resume, then pushes them to the JENTIS video tracking model: Video Event Model.

The YouTube Video Tracker is a plugin, not a connector like Google Analytics or Facebook Conversion API. It does not send data to analytics tools or third parties on its own. Instead, it writes standardized video interaction data to the JENTIS data layer. You can use that data in downstream tools or build your own trigger logic from the values the plugin provides.

circle-info

The plugin can only track videos when it can access the underlying YouTube player events. Some embed methods block that access. In rare cases, a specific combination of website setup and embed code can prevent interaction tracking.

Plugin Generated Data

This example shows a typical data layer push after a user interacts with a video.

window._jts.push({
    track: "video", // JENTIS data layer command
    provider: "youtube",
    start: /* Timestamp when the user started the video. */,
    duration: /* Duration of the currently playing video in seconds. */,
    currenttime: /* Elapsed playback time in seconds. */,
    percent: /* Current playback progress as a percentage. */,
    status: /* Current playback status: play, seek, pause, complete. */,
    url: /* URL of the video. */,
    title: /* Title of the video. */,
    id: /* Unique ID of the video. */
}, true);

Configuration of the YouTube plugin

To enable and configure the plugin, open JENTIS Tag Manager and go to PluginsAdd New Plugin.

Review these six settings:

  1. Track other interactions with the video: Enable this option to track actions such as pause, seek, and buffer, and push them to the JENTIS data layer. The default interactions play, pause, and progress are controlled by the settings below.

  2. Enable API support and reload videos: YouTube videos are embedded as iframes. When you enable this option, the plugin checks each video URL for the enablejsapi=1 query parameter. If the parameter is missing or set to 0, the plugin updates it and reloads the iframe.

  3. Track start of video: Enable this option to track the initial start of the video, including autoplay.

  4. * Bind library to element click: Some YouTube videos are not available at page load because they only load after a user clicks another element. In that case, tracking cannot start immediately. Enter a valid CSS selector for that clickable element, or leave the field empty if you do not need this behavior. Once the user clicks the element, YouTube tracking starts. Example: .play-button

  5. Track end of video: Enable this option to track when playback reaches the end of the video.

  6. Track progress: Enable this option to track playback milestones. For example, if you enter 25|50, the plugin sends an interaction event when the user reaches 25% of the video and again at 50%. Use integers only. Separate values with a pipe character. Do not add spaces.

Quick guide: create a variable to retrieve YouTube tracking data

Use these four steps to create a variable for YouTube interaction data. In this example, the variable returns the video title:

  1. Create a new variable for a video property, such as the video title.

  2. Click Add New Variable.

  3. Select Get JTM data layer value.

  4. Define the properties as follows:

    1. Document name: video — this matches the track property in the data layer push event.

    2. Property: title — this is the value you want to return.

    3. Leave the other properties empty.

Last updated

Was this helpful?