The ROI Revolution Blog

« The Definition and Importance of a 'Scenario' | Main | Google Analytics Invitation Codes on eBay »

Tracking Downloads with Google Analytics

April 4, 2006

With log-based web analytics utilities like Urchin Software, tracking downloaded files is easy. Your web logs register a hit whenever someone grabs a pdf or views a movie.

With a script-based package like Google Analytics, it's not possible to call the Javascript from pdfs, wmvs, avis, etc. So how can you tell when someone has taken the time to watch that video it took you days to create, or read your pdf whitepaper outlining the benefits your business offers over its competition?

That's where the urchinTracker function comes into play. Find the link to your downloadable file and tag it with urchinTracker, and the function will assign a virtual pageview to whichever filename you choose.

Here's the link to your prize-winning video short:

<a href="/picayunepress.avi">Click here to
view the movie!</a>

Just tack on the urchinTracker call as an onClick event:

<a href="/picayunepress.avi"
onClick="javascript:urchinTracker
('/movies/picayunepress.avi');">
Click here to view the movie!</a>

And whenever anyone clicks on the link, it'll register as a hit to /movie/picayunepress.avi.

You can use the urchinTracker function for all sorts of things. Use it to track Flash events, outbound links, and even to generate unique pageviews for sales funnels that use the same URL for each step.

If you would like more help with Google Analytics, be sure to subscribe to the XML feed for our blog or join our free 1 hour Google Analytics live web seminar.

Interested in learning more about Google Analytics?
Attend our LIVE Google Analytics Seminars for Success training in Atlanta, GA Wednesday, April 14th, 2010 and Thursday, April 15th, 2010 or get the latest tips and tricks sent to you via our free, twice-monthly Google Analytics newsletter.

Comments

Post Your Comments

Feedback Form