user757428
user757428

Reputation:

No data getting to Google Analytics

GA Pro is not working on my website.

Below is the script in my site (GA account ID replaced with XXXXXXXX).

<script type="text/javascript">
var s1 = new SWFObject("/player/player.swf","single","320","260","7");
s1.addParam("allowfullscreen","true");
s1.addParam("allowscriptaccess","always");
s1.addVariable("file","");
s1.addVariable("image","");
s1.addVariable("plugins","gapro-1");
s1.addVariable("gapro.accountid","UA-XXXXXXXX-1");
s1.addVariable("gapro.trackstarts","true");
s1.addVariable("gapro.trackpercentage","true");
s1.addVariable("gapro.tracktime","true");
s1.addVariable("gapro.idstring","||name||");
s1.write("player1");
</script>

Upvotes: 1

Views: 566

Answers (3)

cyredge
cyredge

Reputation: 1

function add_my_google_analytics() {
?>

<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-XXXXXXXX']);
  _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);
  })();
</script>

<?php
}
add_action('wp_head', 'add_my_google_analytics',99);

try this tutorial

Upvotes: 0

Tristar Web Design
Tristar Web Design

Reputation: 765

This doesn't look like the standard GA code, shouldn't it look like this -

<script type="text/javascript">

  var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXXXX-X']);
_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);
  })();

</script>

Upvotes: 1

Deepu S Nath
Deepu S Nath

Reputation: 1184

The issue might be due to the fact that you've set gapro.idstring = ||name||, which likely isn't set in your playlist. You'll need to be sure to use an element from the list of playlist properties (http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/12536/configuration-options#pl...).

Additionally, there may be an issue where trackstarts, trackpercentage, and tracktime cause the plugin to work incorrectly so we don't recommend setting them to "true".

Finally, if you'd like to see what data is being sent to Google as-it-happens, open up a proxy like Firebug or Charles and verify that there are requests being made once you click play or finish the video.

Upvotes: 0

Related Questions