Tracking (External) Downloads
A few external sites (not under our direct control) host direct links to download our binaries (Mac and PC). To illustrate, siteA puts two links e.g. www.mysite.com/PC.exe
and www.mysite.com/Mac.dmg
; and the same on siteB.
What is the best possible way to track # of downloads using Google Analytics? Ideally, I'd like to be able to drill down # of downloads of PC and Mac for each site. That is, something like (3 PC and 5 Mac downloads from siteA; 1 PC and 2 Mac downloads from siteB).
The one I can think of is to create an "interstitial" page where the external sites point to (by passing a query parameter of which binary to download e.g. www.mysite.com/x.html?binary=PC.exe
, which will then trigger an ev开发者_运维技巧ent tracking script (Google Analytics). However, this approach will not give us the info about where the request was coming from. Maybe I am missing something here?
2 options, both using onclick :
(1) Create a virtual Pageview (not recommended) :
<a href="http://www.example.com/downloads/PC.exe" onClick="_gaq.push(['_trackPageview', '/downloads/PC.exe');"> PC Download </a>
(2) Use Event Tracking (recommended):
<a href="http://www.example.com/downloads/PC.exe" onClick="_gaq.push(['_trackEvent', 'Category', 'Download - Pc.exe','Label', optional_value]);">Play</a>
Google Analytics recommends the latter, but there are pros and cons for both methods :
- Using Virtual PageViews will increase the number of page views and distort metrics like Pages/Visits, Bounce Rate, and related metrics. By contrast, Events are tracked separately, but also count towards Bounce Rate (a Visit consisting of only 1 page and a download will not be considered a Bounce)
- Event Tracking is more flexible, as you can choose a Category, Action, Label and a Value for the Event, and view them independently from Pages. However, that means you need to think carefully about how you want to use the data model.
- Event Tracking has the following default metrics : Total Events, Unique Events, Event Value and Average Value.
- Pages have the following default metrics : Pageviews, Unique Pageviews, Avg. Time on Page, Bounce Rate, % Exit.
- An interesting 'bug' is that filters applied to URLs/hostnames will not filter out Events. In fact, there is no way to filter out Events - they will show up in all Profiles. Problematic if you use Profile filtering a lot.
Best way to go is to test both options and make up your mind after you see the data.
精彩评论