Tracking downloads in Google Analytics. You’re set up, what’s next?
– posted April 28th, 2009 by Niamh Phelan Comments (6)
I deployed your script. Now what?
If you have deployed our script as Peter showed you, you’ll be able to track the downloads on your site. Now it’s time to analyse your results. How are the downloads, mailtos and external links going to show up in Google Analytics (GA)?
The script scans each page and autotags all downloads, mailtos and external links with ‘onclick events’. This means that every time a visitor clicks one of these links, a virtual page view is sent to GA.
The virtual page views appear in the ‘Top Content’ report in GA and they look like this:
Downloads: /virtual/download/page/file-name/
Mailtos: /virtual/mailto/page/email-address/
External links: /virtual/exlink/page/destination-url/
Each time one of these events takes place,
- the name of the downloaded file is logged,
- the email address to whom the email is sent is logged, and
- the destination of the link the visitor followed off your site is logged
Further, in all cases, GA logs the page from which the virtual page view was triggered. This is valuable data:
Consider a scenario where visitors have the option to download a newsletter from your home page or from your publications page. By measuring the page from which users launched the download, you have full visibility on which page generated more newsletter downloads. Note you may have more than one line entry in ‘Top Content’ for any given PDF. Each line item records each location where the file was downloaded.
How do I structure my account?
You can measure what you want to measure. Here’s how.
- If you want to isolate all of these virtual page views, simply type /virtual/ in the ‘containing’ field at the bottom of ‘Top Content’
- If you want to isolate just the downloads, type /virtual/downloads/ into the ‘containing’ field at the bottom of the ‘Top Content’ report.
- If you want to isolate just external links type /virtual/exlinks/ into the ‘containing’ field at the bottom of the ‘Top Content’ report.
- If you want to isolate just mailtos, type/virtual/mailtos/ into the ‘containing’ field at the bottom of the ‘Top Content’ report.
You get the gist.
For example, to isolate only the file downloads, type, /virtual/downloads/:
The third entry indicates that there were 39 downloads (pageviews) during 36 sessions (unique pageviews) of the file PM18012008.pdf, launched from the page http://www.iqcontent.com/about/jobs/ in the time period selected.
You may be happy to leave your implementation at this; however, I prefer to maintain separate profiles for
- Real Pageviews
- All Pageviews
- Virtual Pageviews
That way, I have one profile that contains only real pageviews, ensuring that I have access to a clean figure. I also have one profile in which I can see only the virtual page views and one profile in which I can see both real and virtual pageviews.
Perhaps I want to look at the navigation summary report to find out what real page visitors viewed the most after downloading a given file. For this I need both virtual and real pageviews in a single profile.
Set up a new profile
Click on the GA logo in the top left of the screen to get to the ‘Analytics Settings’ screen.
Click the ‘Add Website Profile’ button at the bottom of the screen to get to the’Add Profile’ screen.
The profile will be for your main domain (in our case www.iqcontent.com). At this point you need to give your profile a name.
Once you click ‘Finish’ you will have created your new profile.
The next step is putting a filter onto your profile to ensure only real, virtual or all pageviews are captured. Go to the analytics setting screen, choose ‘profile settings,’ and add your filter.
For the ‘Virtual Pageviews’ profile you need to add the ‘include virtual pageviews only’ filter, indicating that only pageviews that start with /virtual/ should be accepted into this profile.
For the ‘Real Pageviews’ profile you need to add the ‘exclude virtual pageviews’ filter, indicating that pageviews that start with /virtual/ should be not be accepted into this profile.
Stay out of it
No particular URI filter is required for the ‘All Pageviews’ filter, but as ever, all profiles should have an ‘exclude IP address’ filter to stop your own use of the site from polluting you stats.
Any questions or comments, Peter and I are happy to respond.
Digg this post Submit to del.icio.us Submit to technorati
Categories Web analytics









6 comments so far
1. » PDFs and Google Analytics: What a combo! - iQ Blog on Apr 28th, 2009 - 11:42
[...] tuned: Niamh will let you know in the next post about how to analyse this data using [...]
2. Ruairi on Apr 30th, 2009 - 08:02
Could the same trick be applied to track what elements users click to get to site content?
For example, a website owner has a page about cats. Users can get to this from the homepage or section pages in multiple ways - e.g. primary navigation, content components and the footer.
GA site overlay can be used for this but it can be buggy. URL parameterisation can be used too (e.g. ?from=homePromoCats | ?from=homeFooterCats) but this has other seo negative knock ons.
Could your onclick event be used to track what link the user clicked to get to the cats page? Or is there a better way to do this?
3. Niamh on Apr 30th, 2009 - 10:34
Hi Ruairi
You certainly can use on click events to track clicks on non-page elements, e.g. buttons. Google have instructions online at:
http://www.google.com/support/.....swer=55521
The key with this technique is to pick suitable “virtual pageviews”. Log as much info as you could possibly need, e.g /home/footer/cats/. In this way you can analyse all clicks from home, the overall use of the footer, and the source of clicks to the cats page. (I have found analysing which navigation components are most used can be very insightful.)
You might also like to use these virtual page views in scenarios where the page content changes but the URL does not.
As you have probably noticed the figures in site overlay describe how many visits there were to the destination of the link, which is not necessarily the same as the number of clicks on the link, particularly in cases where there are two links to the same destination on a page.
Finally, if you want a quick answer to which pages are driving traffic to the cats page, drilldown on this page in top content, and select navigation summary from the ‘Analyze’ dropdown. As per site overlay though, this will not give you which page elements are driving the traffic, only the page.
Best wishes
Niamh
4. Ruairi on Apr 30th, 2009 - 16:17
Cheers Niamh, all that is very useful. Now to find the time to do it
5. mick on Jun 12th, 2009 - 13:50
Hi Niamh, really enjoyed your workshop at bootcamp and thanks for supplying all this backup info.. inspiring stuff, but like ruairi says, now it’s just a matter of finding the time!
6. Niamh Phelan on Jun 12th, 2009 - 17:04
Thanks Mick, pleasure.
You might want to check this out re tracking Flash sites:
http://flashspeaksactionscript.....eep-track/
Brett was a founder owner of Urchin, the software that went on to become GA, and he works for Google now.
All the best
Niamh