Re: Has anyone successfully managed to track video starts and finishes?

Kennedy_Weible
Level 2

We're following the steps on this Marketo blog post: http://developers.marketo.com/blog/send-view-data-from-a-youtube-video-to-marketo/

And we can't make it track the starts and finishes. We're using a Marketo guided landing page.

15 REPLIES 15
Shelly_Wilson
Level 3

We're looking in to a Wistia subscription to make tracking of video plays easier. Integrates with Marketo...seems to have a lot of nice analytics AND can embed Marketo forms into videos

Anonymous
Not applicable

We have Wistia and are happy with it. We're using our video views in our lead scoring. So far we haven't used the forms with the videos but that is just because of the way we are using our videos.  We do also send links to our webinar recordings to our webinar no shows. The Wistia smartlist choices let us keep that ungated for them and if they watch later we can convert their status to watched on-demand and respond.

SanfordWhiteman
Level 10 - Community Moderator

Without a link to your page we couldn't tell you what you're missing.

This demo shows 3 different videos logging separately via Munchkin: MktoMunchkin :: 3 YouTube Players

You can adapt this code (more flexible than the code in the blog post) for your environment easily.

Kennedy_Weible
Level 2

Ah yes, the link: http://connect.phreesia.com/LP-2018-04-17-Dean-McGee-Phreesia-Films_01-Dean-McGee-The-Gift-of-Sight....

Sorry, this is my first time posting here.

And thanks for the resources, I'm going through them now.

SanfordWhiteman
Level 10 - Community Moderator

Also, your page is logging starts and finishes:

pastedImage_0.png

pastedImage_1.png

Kennedy_Weible
Level 2

May I ask, what are you using here to see this?

pastedImage_1.png

Kennedy_Weible
Level 2

My query parameters do not come back into the Activity Log "video=finished" or "video=started" like the code is requesting. They come back like this:

pastedImage_1.png

Which will, in fact, work in a Smartlist if I paste it into the Querystring constraint on the filter. It will return this individual person. This is the full QP that comes back in the Activity Report:

mkt_tok=eyJpIjoiWWpRelpHUTJNVGcxWmpNMCIsInQiOiI5K0dWV2l4SHllOUJPS2tDeFl1SmxcLzBxQ0RRc3B2aVlJQXdVZmJKRTNmS0NmTVZSRUFoSFp0UVU3ZUpTYkFBa0w3Q3V1MmNMK1hcL1FQNGQrdytzREpsalU1Qmc4M3ZwM01oQytVdXA0ZzQ5NFZCcFwvTHNVQnhEdjV3ZjhBOGZ5OCJ9

SanfordWhiteman
Level 10 - Community Moderator

That's not the video event.

The video event won't include the mkt_tok. Only the main document's Visit Web Page event has the mkt_tok in the URL. The synthetic Visit Web Page events for videos are separate entries in the Activity Log.

SanfordWhiteman
Level 10 - Community Moderator

May I ask, what are you using here to see this?

That's Firefox Developer Tools' Network tab but any browser has an equivalent feature.

Kennedy_Weible
Level 2

Would that indicate the problem is with my Smartlist?

Steven_Vanderb3
Marketo Employee

Can you explain your entire process of how you're tracking this in Marketo?  Where you are trying to see it (Smart List? Lead Record?), how you're trying to retrieve it (Smart List filters?  Activity Log?), etc.?  It doesn't sound like the full story has been told yet to fully troubleshoot what's happening.

Kennedy_Weible
Level 2

Sorry, I'll elaborate. Like I said, first time posting here (and thanks so much for the responses).

We embedded the code below into one of Marketo's Guided Landing Pages, which now lives in our Templates folder in Design Studio.

I used that template, which now includes the embedded YouTube video, to create my landing page and then I added copy, etc.

To track this, I'm creating a Smart List in the same program where my approved landing page lives and using "Visited Web Page" as my filter. For "Web Page IS" I've tried everything from the page as its named in the program -- LP 2018-04-17 Dean McGee Phreesia Films.01 Dean McGee The Gift of Sight.html -- to the page as it displays in the URL - http://connect.phreesia.com/LP-2018-04-17-Dean-McGee-Phreesia-Films_01-Dean-McGee-The-Gift-of-Sight.... -- with no success. And I'm using the Querystring constraint of "Querystring CONTAINS started."

<div id="player"></div>

<script>

var tag = document.createElement('script');

tag.src = "https://www.youtube.com/iframe_api";

document.getElementsByTagName('head')[0].appendChild(tag);

//Change 'iiqxcjxJ5Us' to video needed

var player, videoId = 'iiqxcjxJ5Us';

function onYouTubeIframeAPIReady() {

player = new YT.Player('player', {

height: '390',

width: '640',

videoId: videoId,

events: {

'onStateChange': onPlayerStateChange

}

});

}

function onPlayerStateChange(event) {

switch( event.data ) {

//Send video started event to Marketo

case YT.PlayerState.PLAYING: Munchkin.munchkinFunction('visitWebPage', {

url: '/video/'+videoId

, params: 'video=started'

}

);

break;

//Send video finished event to Marketo

case YT.PlayerState.ENDED: Munchkin.munchkinFunction('visitWebPage', {

url: '/video/'+videoId

, params: 'video=finished'

}

);

break;

}

}

</script>

SanfordWhiteman
Level 10 - Community Moderator

Also, when posting code please use the Advanced Editor's syntax highlighter...

pastedImage_2.png

Kennedy_Weible
Level 2

Thanks, I'll try the web activity reports.

SanfordWhiteman
Level 10 - Community Moderator

If using a custom Smart List, you'll only be seeing logs from associated Munchkin sessions -- anonymous sessions will not be shown in results.

You should start by using two Web Page Activity reports. On the Setup tab, select Known Leads for one report and Anonymous (including ISPs) for the other.