Has anyone used NI to track embedded YouTube videos?

If so, care to share your experience? I asked Google and found some info about doing it in YWA and GA but little else. I suspect their methodologies can be used with Unica tags, but before I go trying to figure it out (I'm not much of a coder) I thought I'd see if anyone here has an example.

While we're at it, I'm interested in tracking other types of embedded video as well (without the ability to edit the Flash itself). Any ideas are welcome.


Views: 100

Reply to This

Replies to This Discussion

Hello Angie,

You are correct that the approach is very similar. Without heavy coding, here is a link to an example of how this would be done using GA.   http://www.bluefountainmedia.com/blog/track-youtube-player-events-g...

The approach is to use the YouTube player API and built a DIV container for the playing controls and hand the events handler responses to the NetInsight event tags.

events: {

'onReady': onPlayerReady,

'onStateChange': onPlayerStateChange


Here is an example (using pseudo code) on how to capture the events.

function onPlayerStateChange(event) {

if (event.data ==YT.PlayerState.PLAYING)

{ntptEventTag('ev=YTVideos&action=Play&video=' . player.getVideoUrl() ); }

if (event.data ==YT.PlayerState.ENDED)

{ntptEventTag('ev=YTVideos&action=WatchToEnd&video=' .player.getVideoUrl() ); }

I hope this provides some assistance. The code hasn't been tested but it should work in theory.

Lee Isensee
Director, Solutions Engineering

An old thread... but for others who may reference this... Lee is spot on, and in case it helps to have working JS instead of his pseudo-code I am attaching some.


Reply to Discussion


© 2018   Created by Wendy Ertter.   Powered by

Badges  |  Report an Issue  |  Terms of Service