Googleanalytics 2 Trackdownloa

This Project Name: “Using Google Analytics to Track Number of Downloads”

I have read from page (http://www.google.com/support/analytics/bin/answer.py?answer=55529) that inserting the following Google Analytics Code before the </head> tag will lead to successful tracking of the number of times a file has been downloaded. But the </head> is usually placed high up on the page and just before <body> tag, so I suspect that is the reason the following codes inserted before any download button on my webpage did not manage to track the number of times the pdf file is downloaded/the download button is pressed. But I am not sure if it could be other reason, like for example the following codes to track pageviews is incorrect (I emulated the codes on above’s http://www.google.com/support/analytics/bin/answer.py?answer=55529 , by the way):

So Now, code for download button to download the file has become:
<a href=”http://www.yourdomain.com/nameofebook.pdf” onClick=”javascript: pageTracker._trackPageview(‘/downloads/nameofebook’); “>

Previously code for download button to download the file was:
<a href=”http://www.yourdomain.com/nameofebook.pdf”>

The reason I know that the downloads are not successfully tracked is that I have gone into Google Analytics account after 12 hours and checked the corresponding site, which shows only total page views to the page but not the number of downloads when those buttons are pressed.
I had expected number of pageviews tracked for ‘/downloads/nameofebook’ to be successfully shown on my Google Analytics page for this site. But nil. Nothing is there for this.

So, I need this problem to be fixed.

Note: Escrow funds only will be released if the project is successfully completed, but not when the problems fail to be rectified and yet time had been spent by programmer. So NO BETTING please ! Bidder MUST BE 100% CAPABLE to track number of downloads.

———————————————————–
Here’s the Google Analytics code inserted before </head> at top of page:

<script type=”text/javascript”>

var _gaq = _gaq || [];
_gaq.push([‘_setAccount’, ‘UA-some numbers’]);
_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>
———————————————————–

Leave a Reply

Your email address will not be published. Required fields are marked *