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

Kennedy_Weible
Level 2

Has anyone successfully managed to track video starts and finishes?

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
SanfordWhiteman
Level 10 - Community Moderator

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

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

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

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

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

Also, your page is logging starts and finishes:

pastedImage_0.png

pastedImage_1.png

Kennedy_Weible
Level 2

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

Would that indicate the problem is with my Smartlist?

Steven_Vanderb3
Marketo Employee

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

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

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

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

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

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.

SanfordWhiteman
Level 10 - Community Moderator

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

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

pastedImage_2.png

Kennedy_Weible
Level 2

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

Thanks, I'll try the web activity reports.