What is wrong with my analytics code?
- SEO |
Here is my main analytics code: (with some parts hidden)
-------------------------------------------------------------
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push( ['_setAccount', 'UA-xxxxxxx-x'],['_trackPageview'] );
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';
var s = document.getElementsByTagName('script')[... s.parentNode.insertBefore(ga, s);
})();
window.onload = function() {
if(_gaq.I==undefined){
_gaq.push(['_trackEvent', 'tracking_script', 'loaded', 'ga.js', ,true]);
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';
s = document.getElementsByTagName('script')[...
gaScript = s.parentNode.insertBefore(ga, s);
} else {
_gaq.push(['_trackEvent', 'tracking_script', 'loaded', 'dc.js', ,true]);
}
};
</script>
--------------------------------------------------------------------------
Here is my onclick event code that doesn't seem to be working. Can anyone verify that it is set up properly?
-------------------------------------------------------------------------
<a onClick="_gaq.push(['_trackEvent', 'AffiliateClick', 'AffiliateName', 'my-page-name']);" href="http://affiliate-link..." rel="nofollow"><img title="" class="alignnone size-full wp-image-24323" alt="get started now" src="http://... width="520" height="187" /></a>
-
Marty Foley -
Thanks - 1 reply
Signature"FasterProducts.Com: Create or Acquire Your Own Products That Earn You Recurring Income"{{ DiscussionBoard.errors[8969678].message }}-
ppc specialist -
Thanks
{{ DiscussionBoard.errors[8970574].message }} -
-