Three Tips for Google Analytics: Tracking Outbound, Email and Download Links

google_analyticsGoogle Analytics is perhaps the easiest and cheapest way for just about anyone to get valuable and insightful performance and traffic information about their web site with little or no programming knowledge.  Simply drop a small snippet of JavaScript code into any web page and Google will begin securely collecting traffic data. The resulting data is then formatted into clean, easy to read reports.

However, most new users generally don’t seem to get past the practice of tracking individual pages on their sites.  Google Analytics is actually capable of tracking several more types of visitor behavior.  The three tracking opportunities that I see overlooked the most (and will most often recommend to clients) are the ability to Track Outbound Links, Track Email Links and Track File Download Links.

All these tips assume you already have a Google Analytics account. If you don’t have one, sign up for a Google Analytics Account. It’s free and will only take a few minutes.  Once you’ve got an account, add the Google tracking code to all the pages on your site (or at least the ones you want to track and use these features on).

Tracking Outbound Links with Google Analytics

A generic outbound link looks something like this:

<a href=”http://www.some-external-web-site.com”>Some External Web Site</a>

To add Google Analytics to the link, alter it like so:

<a href=”http://www.some-external-web-site.com” onClick=”javascript: pageTracker._trackPageview(’/outgoing/some-external-web-site.com’);”>

Note that if you want to assign a unique tracking name to EACH different external web site You can use anything, but avoid using spaces or special characters and I find it best to use a memorable term, if not the actual URL to quickly identify my traffic in the resulting Google Analytics reports.

Tracking Email Links with Google Analytics

While the venerable mailto: link has fallen from favor for various reasons, you’ll still find it in many sites as a quick contact option. It too, can be uniquely tracked with Google Analytics.

A generic mailto link looks something like this:

<a href=”mailto:johndoe@domain.com”>Email John Doe</a>

To add Google Analytics to the link, alter it like so:

<a href=”mailto:johndoe@domain.com“ onClick=”javascript:urchinTracker(’/mailto/johndoe’);”>Email John Doe</a>

Just as was the case with outbound links, note the use of a unique identifier to make your resulting report easy to identify.

Tracking Download Links with Google Analytics

And by far the most popular request of Google Analytics is the ability to track file downloads from a site.  It is important to realize that Google Analytics tracks the LINK, not the file itself.  This means that if a user downloads a file directly rather than clicking on a link to that file on an existing page, the tracking data will not be recorded.  For SEO and tracking purposes, it is always recommended that you distribute a download page URL instead of a direct URL to files you are hosting.  Example: Distribute a link like this one, http://www.your-web-site.com/downloads.html instead of one like this, http://www.your-web-site.com/OurNewsletter.pdf

Another factor is that only a select group of file types are supported by this sort of tracking.  The following file types are supported at the time of this article: doc, eps, jpg, png, svg, xls, ppt, pdf, xls, zip, txt, vsd, vxd, js, css, rar, exe, wma, mov, avi, wmv, mp3.  If you have a type that is not included in this list, you might consider archiving/compressing it as a zip or rar file. These are very widely supported and have the additional advantage of saving your guests some download time and both parties some bandwidth.

A generic mailto link looks something like this:

<a href=”http://www.your-web-site.com/OurNewsletter.pdf”>Download Our Newsletter</a>

To add Google Analytics to the link, alter it like so:

<a href=”http://www.your-web-site.com/OurNewsletter.pdf” onClick=”javascript:pageTracker._trackPageview(’/downloads/OurNewsLetter’); “>

Google Analytics & WordPress

If you’re using the popular content management software, WordPress, your job is even easier.  A wonderfully robust plugin simply called Google Analytics for WordPress is a free download.  Aside from handling all those normal page tracking code inserts, it will also allow you to “tag” outbound links and file download links for tracking.  All from a graphic interface within the normal WordPress Dashboard of your blog.

Important Note: The Google Analytics terms of service prohibits individual identifying information for privacy reasons.  Ingenious developers may be able to circumvent this limitation, but it is strongly recommended against doing so, as Google is fully within its right to permanently ban you from using its resources as a result. If you want to track specific visitors, you’ll need to look elsewhere and incorporate additional tools separate from Google Analytics. While this might be frustrating to some users, as a Google user, I support and appreciate their respect for the privacy of individuals.

You may also like...

6 Responses

  1. Austin says:

    corr: email version needs a space before ‘onclick’ as follows:

    Email John Doe

    Email John Doe

  2. Austin says:

    you get the idea (above) … its 3:30 am

  3. Mystech says:

    Thanks, for the sharp eye Austin! Poor editing on my part.

  1. August 26, 2009

    […] Extractor does not depend upon any additional software the way many email extractors …[ ]Cafe Arcane » Blog Archive » Three Tips for Google Analytics …1 hour ago by Mystech  The three that I tracking opportunities I see overlooked the most (and […]

  2. August 26, 2009

    […] original here: Cafe Arcane » Blog Archive » Three Tips for Google Analytics …Share this on del.icio.usDigg this!Share this on RedditBuzz up!Stumble upon something good? Share it […]

  3. August 26, 2009

    […] See original here: Cafe Arcane » Blog Archive » Three Tips for Google Analytics … […]

Leave a Reply