GA Event Tracking Code for Video

If you have videos on your site, you may want to know how your visitors are interacting with them. How many visitors played the video? How many watch until the end? Do people who watch the video convert more often than those that don’t? By implementing event tracking on your videos you can answer these questions.

There are many options for embedding video on your page, and how you implement event tracking depends on which option you use.

YouTube Videos Embedded On Your Site:

Although this is possible, it involves customizing a JavaScript file. For more details, see Tracking YouTube Videos in Google Analytics.

Standard Flash Video Player:

Although this is possible, it involves working with the Flash source file (.swf) and editing the ActionScript. For more details, see Google Analytics Tracking for Adobe Flash.

FlowPlayer:

FlowPlayer is an open-source Flash video player – you supply the video file and it handles the playback and viewing functionality. It is free and has a plugin that does the event tracking for you.

See the details for setting up the Google Analytics plugin on the FlowPlayer site for information configuring event tracking for your videos.

HTML5 Video:

Although this is possible, it involves customizing a JavaScript file. See the following resources for more details:
Tracking HTML5 with Google Analytics
HTML5 Demo: Tracking Video Progress with Google Analytics