1
votes

I need to enable event tracking of Youtube-videos embedded in a site, but since Youtube has switched to iframe-based embedding-code, I'm kinda lost ...

Google/Youtube documentation ( http://code.google.com/intl/da-DK/apis/youtube/iframe_api_reference.html ) only describes how to enable the API when videos are embedded programmatically using the API itself - not when they are copy-pasted onto a page in, say, a CMS.

On top of that, the documentation states that the Youtube Player API for iframe tracking is experimental and should not be used for production sites!

Has anyone found a way to make this work? To listen to events fired by an iframe-embedded Youtube video?

2
I haven't tested it, but you may be intersted in this lib. code.google.com/p/ga-youtube-tracker butI think it only work with the embedded version.Eduardo
According to developers.google.com/youtube/iframe_api_reference, on June 6 2012, Google removed the Experimental status.Eccentropy

2 Answers

2
votes

It looks like this can be used to get events and call functions on a YouTube video embedded via an iframe.

https://developers.google.com/youtube/iframe_api_reference#Events

2
votes

There are a few resources available on the web for this:

  1. For the DIY'er on google analytics: http://www.lunametrics.com/blog/2012/10/22/automatically-track-youtube-videos-events-google-analytics/
  2. For someone who's looking for a product catered youtube analytics (currently free): http://www.vidanalytic.com/