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

Your preferred username that is used when logging in.

Need help with Google Analytics Event (lack of) Reporting Created Jun 1, 2010

This thread is solved

Views: 2229     Replies: 4     Last reply Aug 7, 2011  
You must login first before you can use this feature

southernroutes

Posts: 3

Registered:
May 28, 2010

Need help with Google Analytics Event (lack of) Reporting

Posted: Jun 1, 2010

I thought I had everything right, but there's no event data being reported in GA for my single movie clip. Here's my js code:

<script>
     flowplayer("player", "flowplayer.commercial-3.2.1.swf", {
	
          key: 'my-flowplayer-key-goes-here',
							
          clip:  {
               autoPlay: true,
               autoBuffering: true,
               onStart: function(clip) {
                    _tracker._trackEvent("video", "play", clip.url);
               }
          }				
     });

The documentation here seems inconsistent with what GA has me include on my page, which is this:


<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'my-ga-code-goes-here']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();


Can anyone shed some light here? Did I miss a semi-colon somewhere?

Oh, I'm using FlowPlayer commercial.

Thanks!

Edge
Vizmu Media ------------------- http://vizmu.com/

Posts: 576

Registered:
Nov 29, 2008

» Need help with Google Analytics Event (lack of) Reporting

Posted: Jun 2, 2010

Reply to: Need help with Google Analytics Event (lack of) Reporting, from
The easiest way to track data is using the analytics plugin.
http://flowplayer.org/plugins/flash/analytics.html

Just include the plugin in your flowplayer config.

southernroutes

Posts: 3

Registered:
May 28, 2010

Thanks, but...

Posted: Jun 2, 2010

Reply to: » Need help with Google Analytics Event (lack of) Reporting, from edge
I was only able to get the analytics plugin to work in AS3 mode, not Bridge mode, which is recommended. I'm getting this Flash console error in Bridge mode when clicking Play:

Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095: flash.net.NetStream was unable to invoke callback onMetaData. error=Error: JS Object "window.pageTracker" doesn't exist in DOM
Bridge object not created.

Here's my script tag:

<script>
	flowplayer("player", "flowplayer.commercial-3.2.1.swf", {

		key: 'my-flowplayer-key-goes-here',
		
		plugins:{
			gatracker: {
				url: "flowplayer.analytics-3.2.0.swf",
				labels: {
					start: "Start",
					play: "Play",
					finish: "Finish"
				},
				debug: true,
				trackingMode: "Bridge",
				googleId: "my-ga-code-goes-here"
			}
		}
	});
</script>

I'm out of my league here, but, as I understand it, I should use Bridge as opposed to AS3 mode in order to avoid duplicate analytics data because of the inclusion of google-analytics.com/ga.js. And I need to include that in order to track pageviews, etc. on my video page.

Thanks again for the help!

Edge
Vizmu Media ------------------- http://vizmu.com/

Posts: 576

Registered:
Nov 29, 2008

» Need help with Google Analytics Event (lack of) Reporting

Posted: Jun 2, 2010

Reply to: Need help with Google Analytics Event (lack of) Reporting, from
I've gotten the best results using AS3, however the setup greatly depends on which tracking code you're using.

I haven't experimented with it a lot yet, but thus far its not sending duplicate data because the main tracking code is tracking page views. My current plugin setup is only set to track specific labels.

However:
1. I load the ga.js file pre-gzipped from my own servers "reduces dns lookups".
2. I use a very minimal chunk of script for the page tracking.

My overall google analytics page stats have stayed the same, nothing has doubled up stats wise. The only addition was in the Content -> Event Tracking section of google analytics.

Also -> don't quote me on this as I've yet to thoroughly test it but if you're allowing remote embedding of your media I don't think the bridge mode will consistently work. Again I haven't tested this a lot yet...