Realising Designs Articles


Date icon Posted: November 4th, 2008

Post icon Track file downloads with Google Analytics

Google Buzz

Wanting to track downloads of documents (PDF, Word, MP3 etc..) on your site with the splendid Google Analytics? You will be pleased to hear that it is very easy to achieve with a little addition to the link HTML, as shown below.

The code to add:

onClick="javascript: pageTracker._trackPageview('/files/google-analytics-test.pdf');"

Once added your full link should look a something a little like this:

<a href="http://www.realisingdesigns.com/files/google-analytics-test.pdf" target="_blank" title="Track my download" onClick="javascript: pageTracker._trackPageview('/files/google-analytics-test.pdf');">Test download code</a>

Giving you a link just like this - Test download code - nice and easy!

This will then show as a hit in your Google Analytics content section as if it were a URL. Very handy to monitor your site performance and iron out any creases with user experience.

Share This Post

Share this post:

Delicious Icon   Digg Icon   Redditt Icon   Facebook Icon   StumbleUpon Icon

Leave a Reply

CommentLuv Enabled


Tel: 0800 634 8536 / Itnl +44(0)1227 787027

Home