I’m trying to find a good approach for tracking event data from videos that are played on Facebook. These are videos that are embedded into Facebook directly, where Facebook pulls in open graph meta data for the video.
I’m using JW Player, which has a google analytics plugin, but they’ve confirmed that it’s not possible to use it while sharing on Facebook.
Would the Flash player itself theoretically be capable of sending event tracking data to Google if I hardcoded some modifications? I’m curious as to how the big players like YouTube and Vimeo provide analytical data for their videos that are shared with open graph tags.
I was thinking that maybe I could somehow use the Insights API with Facebook, which I’m looking into as well.
Thanks
UPDATE I’ve added a bounty to the post, and want the clarify a few things. JW Player developers have stated that their current Google Analytics plugin won’t work because it’s implemented using JavaScript and needs to be embedded with JW’s embedder. Their earlier version of the plugin was implemented in Flash, but doesn’t work because facebook embeds the SWF’s with the ‘allowscriptaccess=”never”‘ attribute.
The allow script access restriction is disheartening, because from what I gather, that means that the embed src is restricted from making any HTTP requests (like to Google).
I think this is a misconception. The flash is still able to do HTTP requests from within the flash. The
allowscriptaccess="neverflag only disables flash from issuing javascript commands on the page and is nothing more than expected from facebook or any other network that allow users to post flash objects on other peoples timeline. If javascript access was allowed the flash object could inject malicious javascript scripts into facebook.The recommended way to implement flash tracking for Google Analytics is to use the gaforflash library. This library has 2 modes, AS3 mode and BRIDGE mode. On BRIDGE mode the flash object issue javascript commands to the page, and on AS3 mode everything happens inside the flash.
For cases where you embed the player in a page you don’t own you should use AS3 mode. So in this use case the correct would be to use AS3 mode.
Notice that JW Player has the Google Analytics PRO plugin. Version 1 seems to support AS3 mode but Version 2 doesn’t have that option as far as I’m concerned. So you need to use Version 1 to be able to use AS3 mode.