You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

Google Analytics Support for Externally Embedded Players Created Dec 19, 2008

This thread is solved

Views: 4214     Replies: 23     Last reply Nov 18, 2009  
You must login first before you can use this feature

cosborne

Posts: 1

Registered:
Dec 19, 2008

Google Analytics Support for Externally Embedded Players

Posted: Dec 19, 2008

If I'm a rube, who's missed something, please forgive me.

I love that you have support for Google Analytics in the Flow Player, but from what I can tell, it is only for use on sites you control.

We have a lot of video content in players that are embedded in people's blogs, etc. and we would like to be able to use Google Analytics to track play/pause/etc. in those embedded players.

Is it possible to do this already, and I'm just not seeing it?

Will it be possible soon?

Tero
Author of jQuery Tools and this website + JavaScript developer of Flowplayer.

Posts: 1672

Registered:
Nov 16, 2007

» Google Analytics Support for Externally Embedded Players

Posted: Dec 22, 2008

Reply to: Google Analytics Support for Externally Embedded Players, from cosborne
not possible at the moment. this would need JavaScript on the embedding site. the only way to do this is to provide a custom embedding code that supports this.

anil

Posts: 15

Registered:
Nov 19, 2008

» Google Analytics Support for Externally Embedded Players

Posted: Jan 6, 2009

Reply to: Google Analytics Support for Externally Embedded Players, from cosborne
+1 on this feature. This feature is really the only thing that is holding us back at http://www.streetfilms.org from switching to Flowplayer. We have a demo with flowplayer up at http://design.streetfilms.org/ and everything is working well.

The player we currently use allows us to pass a "callback" flashvar that hits a php file on our server whenever anyone plays an FLV file. This file does the stat tracking for our embedded films.

Tero
Author of jQuery Tools and this website + JavaScript developer of Flowplayer.

Posts: 1672

Registered:
Nov 16, 2007

» » Google Analytics Support for Externally Embedded Players

Posted: Jan 7, 2009

Reply to: » Google Analytics Support for Externally Embedded Players, from anil
not a bad idea. this is a 3.1 thing. our rough TODO list for the new version can be seen from our newest blog entry

http://flowplayer.org/blog/15

Buzz
Author of 'Wordpress Flowplayer', jQuery.saiweb http://saiweb.co.uk Problems, requests? Please log a ticket at: http://trac.saiweb.co.uk

Posts: 259

Registered:
Dec 17, 2008

» » Google Analytics Support for Externally Embedded Players

Posted: Jan 7, 2009

Reply to: » Google Analytics Support for Externally Embedded Players, from anil
BAH Was just about to post something to this effect.

Anyway in _theory_ the following would work fine.

1) two scripts media.php and ga.php
2) ga.php takes a $_GET arg which contains the information you want to pass to GA
3) ga.php is protected via HT access to only allow access from your local server's IP address
4) media.php is a pseudo streaming script that serves the media file, at the top of said file include a simple fopen() or curl() request to ga.php

A hefty work around yes BUT will work with any player you wish to use ^_^

Buzz
Author of 'Wordpress Flowplayer', jQuery.saiweb http://saiweb.co.uk Problems, requests? Please log a ticket at: http://trac.saiweb.co.uk

Posts: 259

Registered:
Dec 17, 2008

» » » Google Analytics Support for Externally Embedded Players

Posted: Jan 7, 2009

Reply to: » » Google Analytics Support for Externally Embedded Players, from DBusby
BETTER YET if you use jQuery

(NOTE: UNTESTED SEE:http://docs.jquery.com/Ajax/load#urldatacallback )



...
onLoad: function() {

$().load("/path/to/file");		

},
onUnload: function() {

$().load("/path/to/file");		
}
...


Note I am still getting my head around jquery, but using the player embed calls of onLoad and onUnload you _SHOULD_ be able to make a jquery ajax call to ANY page

UPDATE: ... assuming of course the embed code passes this information?

Tero
Author of jQuery Tools and this website + JavaScript developer of Flowplayer.

Posts: 1672

Registered:
Nov 16, 2007

» » » » Google Analytics Support for Externally Embedded Players

Posted: Jan 7, 2009

Reply to: » » » Google Analytics Support for Externally Embedded Players, from DBusby
I guess cosborne's issue here is that javascript cannot be used because it's an embedded player.

anil

Posts: 15

Registered:
Nov 19, 2008

» » » » » Google Analytics Support for Externally Embedded Players

Posted: Jan 8, 2009

Reply to: » » » » Google Analytics Support for Externally Embedded Players, from tipiirai
Yes that is exactly right. Javascript cannot be used because it is an embedded player.

Buzz
Author of 'Wordpress Flowplayer', jQuery.saiweb http://saiweb.co.uk Problems, requests? Please log a ticket at: http://trac.saiweb.co.uk

Posts: 259

Registered:
Dec 17, 2008

» » » » » » Google Analytics Support for Externally Embedded Players

Posted: Jan 13, 2009

Reply to: » » » » » Google Analytics Support for Externally Embedded Players, from anil
So you're saying, Javascript cannot be used because it is an embedded player.

Yeh sorry thought it was funny seeing the exact same text 3 times ... VMWare must of driven me mad today

Shezoom

Posts: 1

Registered:
Feb 13, 2009

Hmm... this sounds very possible...

Posted: Feb 14, 2009

Reply to: » » Google Analytics Support for Externally Embedded Players, from DBusby
Since it's this workaround, or don't use FlowPlayer, I suppose it's worth a try...

joed

Posts: 4

Registered:
Feb 20, 2009

Newbie question: can this be done with a plugin?

Posted: Mar 11, 2009

Reply to: Google Analytics Support for Externally Embedded Players, from cosborne
Our client is very interested in this question, too. I'm just starting to try out Flowplayer, though, so please forgive me if this question is moronic. Could a Flash plugin be used to hit the tracking script on the home site?

anil

Posts: 15

Registered:
Nov 19, 2008

» Google Analytics Support for Externally Embedded Players

Posted: Jun 1, 2009

Reply to: Google Analytics Support for Externally Embedded Players, from cosborne
Not sure if this is at all good Action Script, but I hacked something together that works for my use case:http://bitbucket.org/anil/flowplayerpingback/

This plugin will post a video_id and a secret (that can be hard coded) back to the server whenever clip #1 is played. The server can then record this information.

Any feedback appreciated.

raleman

Posts: 1

Registered:
Jun 14, 2009

pingback.as

Posted: Jun 15, 2009

Reply to: » Google Analytics Support for Externally Embedded Players, from anil
Hi Anil, thanks for your post! I'm completely new to flash. We too need a pingback function so I downloaded your script. I managed to get flowplayer compiled following the instructions on the site, and I got the control bar plugin compiled. I need a little help with your script. First, where does it get the video id? Currently we have to supply a url to flowplayer and not the id in our database. Aside from that, I just cant get it to compile. I copied the build.xml from the control plugin and edited it as the instructions suggested, and this is what I get.

C:\cygwin\home\Administrator\flowplayer\flowplayer.pingback>ant
Buildfile: build.xml

build:
[echo] ++ flowplayer.pingback.swf +++
[echo]
[echo] checking if flowplayer.pingback.swf is uptodate
[echo] main up-to-date: ${uptodate.main}

prepare:
[unzip] Expanding: C:\cygwin\home\Administrator\flowplayer\flowplayer.devkit
\flowplayer.swc into C:\cygwin\home\Administrator\flowplayer\flowplayer.pingback
\build

compile:
[echo] compiling with
[echo] compiling with
[exec] Loading configuration file C:\cygwin\home\Administrator\flex3sdk\fra
meworks\flex-config.xml
[exec] C:\cygwin\home\Administrator\flowplayer\flowplayer.pingback\build\fl
owplayer.pingback.swf (1126 bytes)

build:
[echo] ++ flowplayer.pingback.swf +++
[echo]
[echo] checking if flowplayer.pingback.swf is uptodate
[echo] main up-to-date: true

prepare:

compile:
[copy] Copying 1 file to C:\cygwin\home\Administrator\flowplayer\flowplayer
.pingback\build

example:

BUILD FAILED
C:\cygwin\home\Administrator\flowplayer\flowplayer.devkit\plugin-build.xml:184:
The following error occurred while executing this line:
C:\cygwin\home\Administrator\flowplayer\flowplayer.devkit\plugin-build.xml:29: T
he following error occurred while executing this line:
C:\cygwin\home\Administrator\flowplayer\flowplayer.devkit\plugin-build.xml:176:
The following error occurred while executing this line:
C:\cygwin\home\Administrator\flowplayer\flowplayer.devkit\plugin-build.xml:180:
The following error occurred while executing this line:
C:\cygwin\home\Administrator\flowplayer\flowplayer.devkit\plugin-build.xml:162:
C:\cygwin\home\Administrator\flowplayer\flowplayer\build not found.

Total time: 3 seconds
C:\cygwin\home\Administrator\flowplayer\flowplayer.pingback>

MEDIAmobz

Posts: 10

Registered:
Dec 10, 2008

Analytics Plugin

Posted: Aug 19, 2009

Reply to: pingback.as, from raleman
I have written a plugin that uses google AS3 analytics libraries to tie flowplayer directly into google analtyics without any javascript.

It uses the following syntax in the embed:

"analytics": { "url":http://yourhost/flowplayer.analytics-3.1.3.swf","google_id":"YourGoogleID", "debug: true" }

The debug parameter is optional and defaults to off. If debug is set to true, the output from the analytics calls will be displayed over your video but not actually sent to google.

your google web property ID must be set to a valid id.

The plugin will report events for, PLAY, PAUSE(time), STOP(time), SEEK(time), RESUME(time), and FINISH. The (time) means an additional piece of data, the location of the event in seconds, will be sent with the event notice to google. The clip URL is also sent as the label of the event.

I don't have the plugin hosted yet, but would be happy to have it integrated into the flowplayer project if there is interest. The licensing on the google analytics library is Apache 2.0, which is compatible to be used IN GPL3 projects according to apache:http://www.apache.org/licenses/GPL-compatibility.html

Let me know your thoughts and interest on this.

KOMPAS-TV
==Indonesian First VIDEO STREAMING Site== www.seleb.tv www.kompas-tv.com www.videoku.tv

Posts: 6

Registered:
Feb 27, 2009

» Google Analytics Support for Externally Embedded Players

Posted: Sep 3, 2009

Reply to: Google Analytics Support for Externally Embedded Players, from cosborne
Hi mediamobz,

I'm really interested with the plugins that you wrote. Can you please share it with us?

Thank's before

KOMPAS-TV
==Indonesian First VIDEO STREAMING Site== www.seleb.tv www.kompas-tv.com www.videoku.tv

Posts: 6

Registered:
Feb 27, 2009

» Google Analytics Support for Externally Embedded Players

Posted: Sep 3, 2009

Reply to: Google Analytics Support for Externally Embedded Players, from cosborne
Hi mediamobz,

I'm really interested with the plugins that you wrote. Can you please share it with us?

Thank's before

MEDIAmobz

Posts: 10

Registered:
Dec 10, 2008

Sure...

Posted: Sep 4, 2009

Reply to: » Google Analytics Support for Externally Embedded Players, from andhi
I don't mind sharing...is there an appropriate place here for sharing plugins?

3232design

Posts: 30

Registered:
Sep 10, 2009

Me too

Posted: Sep 10, 2009

Reply to: Sure..., from mediamobz
If you email me the files I can put up a link here to them on my server. I'd love to look at them as well.

KOMPAS-TV
==Indonesian First VIDEO STREAMING Site== www.seleb.tv www.kompas-tv.com www.videoku.tv

Posts: 6

Registered:
Feb 27, 2009

» Sure...

Posted: Sep 14, 2009

Reply to: Sure..., from mediamobz
yes we also can provide the mirror for your plugins.

Could you please send me your plugins to admin@sdm-tv.com?

cabraham

Posts: 8

Registered:
Sep 30, 2009

status?

Posted: Sep 30, 2009

Reply to: Sure..., from mediamobz
Hi Mediamobz,
We're looking for something like this too? Is your plugin up somewhere yet?

dalamsap

Posts: 6

Registered:
Sep 24, 2009

Need plugin

Posted: Oct 5, 2009

Reply to: Sure..., from mediamobz
Hi Mediamobz,
we're also looking for this plugin functionality.
This will be very useful for us.

Thank you

3232design

Posts: 30

Registered:
Sep 10, 2009

Google Analytics plugin for Flowplayer

Posted: Oct 8, 2009

Reply to: Need plugin, from dalamsap
I went ahead and figured this out, I couldn't wait. Here's a link to the plugin and source:

http://www.flwoutdoors.com/GoogleTracker.zip

It's a 3.1.3 plugin, and should work with either regular or commercial flowplayer. Call the plugin like this:

plugins: { gatracker: { url: "/path/to/flowplayer.GoogleTracker.swf", google_id: "UA-xxxxxxx-x", debug: false} }

Where the google_id is your Google ID. If debug is true, the plugin won't send tracking info to Google but will instead draw what it would have sent over the video.

This tracks onStart (start(1)), Play, Pause, Stop, and Finish. Also replays (start(2)). It fires two events for each, just because of the way I needed to use it. You could pretty easily modify the source and recompile to do whatever you need it to. Just be sure to have the analytics.swc in your flexdir's /frameworks/libs directory when you compile.

This also works when compiled into flowplayer, so you can compile all of the options right into the flowplayer.swf file for embedding, which was the original problem on this thread.

If the embed code includes the parameter "AllowScriptAccess=always" then this movie will also report what website and page it's embedded into. Note that this site tracking won't work for Myspace, which changes the AllowScriptAccess to "never" when you embed it. Oh well, can't win 'em all.

Hope it's useful for you.

kennyl

Posts: 2

Registered:
Nov 18, 2009

Google Analytics Plugin - Nice Work mediamobz!!

Posted: Nov 18, 2009

Reply to: Google Analytics plugin for Flowplayer, from 3232design
I've compiled the player with the Analytics and OpenAdStreamer plugins. However, Analytics only sends the initial start and not the finish, pause, or additional plays from the streams in the OpenAdStream plugin. Any thoughts on capturing those events from the OpenAdStreamer for Analytics.

3232design

Posts: 30

Registered:
Sep 10, 2009

» Google Analytics Plugin - Nice Work mediamobz!!

Posted: Nov 18, 2009

Reply to: Google Analytics Plugin - Nice Work mediamobz!!, from kennyl
Mediamobz hasn't been around for months, which is why I had to figure it out on my own. I wouldn't mind seeing what he'd done just to make sure mine is as optimized as it can be.

I haven't used the OpenAdStreamer plugin, but I'd guess that it isn't using the same event calls as the regular player. You'd probably want to call the event tracker directly from OpenAdStreamer when it fires those events. If it's firing alternate events, you could just add those to the ones GoogleTracker is listening to. Unless it's firing public events, the GoogleTracker won't know about them.