Tracking Vimeo Videos in iFrames with Adobe Launch
Tracking Vimeo Videos in iFrames with Adobe Launch

Tracking Vimeo Videos in iFrames with Adobe Launch

Videos are the most engaging form of content. In my opinion, Video views are one of the truest parameters of User Engagement. The user today is quite distracted. Having a one-minute long video on-site explaining the feature of the product may boost sales by 20%. A video may be the only thing that will stop your reader from heading to YouTube. Or maybe, the user will come back again to watch another video.

From a marketing perspective, we can target the user who watched a specific video on our site.

Tracking video interaction helps us understanding user intentions and maximizing user engagement.

Vimeo is one of the world's leading professional video platform. Many sites use Vimeo as the video delivery platform because it allows a very high degree of customization not found on competing sites.

This article will try to provide steps to track Vimeo Videos in iFrames with Adobe Launch.

Step 1: Insert the Vimeo Player API

The Vimeo Player API allows you to interact with and control an embedded Vimeo Player Installation. If possible, this JS library should be placed on the site by the dev team.

Create Rule in Launch to insert the Vimeo Player API js file. The Rule Configurations:

Firing Event: Library Loaded (Page Top)

Action Type: Custom Code of Core Extension. Choose HTML as the code language.

Add the following snippet

<script src="https://player.vimeo.com/api/player.js"></script>

This step will allow us to use all the methods and events provided by Vimeo Player API. The API is quite straightforward, and the documentation is quite user-friendly. The documentation is available at the following links:

https://developer.vimeo.com/player/sdk/basics

https://github.com/vimeo/player.js

Tracking Vimeo Videos in iFrames with Adobe Launch
Tracking Vimeo Videos in iFrames with Adobe Launch

Step 2: Create a helper rule to detect the progress of the video

Create a helper rule in Launch to insert Direct Call Events based on the video duration.

Rule Configuration

Firing Event: Core - Window Loaded

Action Type: Custom Code of Core Extension. Choose JavaScript as the code language.

Add the following snippet

var iframe = document.querySelector('iframe');
var player = new Vimeo.Player(iframe);
var cent, counter = 1, retVal;


player.on('timeupdate', function(data) {
    cent = data.percent * 100; 
    if (0.04 <= data.seconds <= 0.07) {
        _satellite.track("video_start");
    }
    if (Math.floor(cent) === 50 && counter === 1) {
        _satellite.track("video_half");
        counter ++;
        retVal = true;
    }
    if (data.seconds === data.duration) {
        _satellite.track("video_end");
        counter = 1;
    }
});
No alt text provided for this image
No alt text provided for this image

We can observe the rules firing in Dev Console after publishing the changes.

No alt text provided for this image

Step 3: Create the rules to collect the video data based on the Direct Call Events

Finally, we need to create the Rules that will fire based on the Direct Call Event passed by the helper rule.

No alt text provided for this image
No alt text provided for this image

Once the rules are published, we can observe the rules firing based on the Direct Call Events passed from the helper Rule in the Dev Console.

No alt text provided for this image

The following articles helped me a lot in writing this article.


Anthony A.

Digital Analytics Engineer @ Sherwin-Williams

3 年

This works except for some reason I'm not getting the play start tag to fire, and also how do you grab the name of the particular video that is playing?

回复
Amanda Elliott

Performance & Analytics Manager at MRM

3 年

This is great! Thank you for the simple and clear directions. I'm putting this to use now but it seems like this tracking solution has a limitation that will only allow it to work on the first video played on a particular page. I'm troubleshooting this now, but wondering if you have any suggestions on a fix for this?

Vamsi Krishna

Analytics & Optimization Analyst at Abbott

4 年

Very nice

要查看或添加评论,请登录

Partha Sarma的更多文章

社区洞察

其他会员也浏览了