Track Interactions with YouTube videos


Google apps and services provide marketing professionals with a variety of data to be used in reports and to gather insights.

To ensure maximum flexibility in gathering data and ease of implementation, Sitefinity Insight enables you to integrate with services, such as YouTube. This way, you gather more knowledge of contacts' behavior through channels and devices.

If your company hosts video materials on a YouTube channel, you can embed this content in your Sitefinity CMS site, so that the site generates more traffic and, thus, has more contacts visiting it. Once you do this, the marketing department can analyze the impact of the embedded YouTube videos on the respective marketing goals.

The following article demonstrates how to collect data for contacts’ interactions with a YouTube video on your Sitefinity CMS site.

PREREQUISITES: Before tracking YouTube videos, you must ensure the following:
  • Sitefinity Insight connector is enabled on your Sitefinity CMS instance.
    For more information, see Activate and deactivate modules.
  • Sitefinity Insight connector is properly configured and connected.
    For more information, see Connect to Sitefinity Insight.
  • If your Sitefinity CMS version is 13.3 or newer, you must enable YouTube video tracking.
    To do this, perform the following:
    1. Log in to your Sitefinity CMS as administrator.
    2. Navigate to Administration » Settings » Advanced » DigitalExperienceCloudConnector.
    3. Click Enable YouTube videos tracking.
    4. Click Save changes.

RECOMMENDATION: If you are using a custom tracking script or a 3rd-party customization library, they may interfere with the built-in tracking functionality.
We recommend either disabling the built-in tracking code, or removing the custom script.

Embed the YouTube video

In this section, you learn how to embed YouTube video on your Sitefinity CMS page, so that it can be tracked in Sitefinity Insight.
Perform the following:

  1. In YouTube, open the video that you want to embed.
  2. Under the video, click the Share button and click Embed.
  3. Copy the sharing URL displayed in the text box.
    For example
    This is the tag that you use to embed the video in your Sitefinity CMS page.
  4. In Sitefinity CMS backend, open for editing the page where you want to embed the video.
  5. Drop a Content block widget on the page and click Enter content.
  6. Click Embed-media (Embed media) button.
  7. Paste the video URL in the editor.
    For example,
  8. Click Save and close the editor.

Track YouTube videos with Sitefinity Insight JavaScript SDK

If you have sites hosted on Sitefinity CMS 12.2 through 13.3, you need to use Sitefinity Insight JavaScript SDK. Perform the following:

  1. On your page, insert the Script widget and configure it to execute in the <head> tag.
    For more information, see one of the following:
  2. Inside the widget, paste the following code:

Tracking considerations

Sitefinity CMS reports the visitors’ actions performed on tracked videos to your Sitefinity Insight data center. You can use these actions as touchpoints and other Sitefinity Insight artifacts. When creating your Sitefinity Insight rules based on video-related interactions, keep in mind the following implementation details:

  • When the visitor plays the video for the first time, Sitefinity Insight reports one interaction with the predicate Start YouTube video.
  • Sitefinity Insight tracks the start of video playback as part of the Content report. Using this report, you can monitor the marketing performance of your videos.
    For more information, see Content report » Videos.
  • If the visitor pauses and then plays the video again, this does not create new Start YouTube video interaction.
  • Sitefinity Insight sends interaction with the following predicates when the user watches the corresponding length of the video:
    • Watch 25% of YouTube video
    • Watch 50% of YouTube video
    • Watch 75% of YouTube video
  • If the visitor finishes watching the video, the predicate is Finish YouTube video.
  • If a visitor watches half of the video, the 25% and 50% thresholds are reported. If, afterwards, the user goes back to the beginning of the video, no interactions are sent for already passed thresholds. The Watch 25% of YouTube video and Watch 50% of YouTube video interactions are sent only once.
  • In case skips portions of the video, Sitefinity CMS reports the length of the watched video by combining the lengths of all watched segments. Sitefinity CMS does not report the absolute thresholds of the video.
    For example, if a visitor watches 10% of the video and then seeks to its 80%, her progress continues from 10% onwards - it is not increased to 80%. Therefore, only the Watch 25% of YouTube video predicate is reported.
  • If the visitor pauses a video, then plays it again after some time, her tracked progress is not lost.
    For example, if the user pauses at ~40% and continues to watch after some time, interaction will be sent when the 50% threshold is reached.
  • When the user finishes a video and then replays it, nothing is tracked.
  • Sitefinity CMS does not support tracking of YouTube playlists.
  • Sitefinity CMS does not support tracking of auto-played videos.

Was this article helpful?