Web Analytics & Marketing Optimisation Experts

Sign up to receive marketing & analysis tips:

Tracking Clicks on Links to other Websites or Downloaded Files in Google Analytics

If you use Google Analytics and want to capture the clicks on links to other websites or the files downloaded from the site then here is a simple script to assist you.

If you have implemented Google Analytics in the standard way, then it is likely that you are not capturing these clicks into Google Analytics. The reason for this is that JavaScript isn't executed by these downloaded files and that any clicks to other websites will cause the visitor to leave the page without leaving a trace. In both cases unless you actually add code to each link then you will not record these events into Google Analytics.

As this has been a common problem with our customers, Panalysis has written a short script that captures all clicks on any link in a web page and then if appropriate records this into Google Analytics.

The script can be downloaded free of charge here. The only thing that we ask in return is that you retain our copyright notice and promotional header in the script. Other than that you are free to use and modify the script according to the GNU General Public License (http://www.gnu.org/copyleft/gpl.html)

To install the script first download this to your web server and rename to outbound.js. Place this file at the root of the web server or another known location. Add the following line below your current Google Analytics code

<script type="text/javascript" src="/outbound.js"></script>

Be sure to change the src="/outbound.js" value to match your own installation.

You can even specify which Google Analytics account that you want to record the event into. This is useful if you don't want to increase the average page views per visitor on the site or just want to separate out the reports.

If you do encounter any errors with the script or bug reports, please forward these to our support team via our contact form.

For a modest fee Panalysis can install and configure the script to your requirements. We also have a version that is compatible with AdSense that can be purchased. Please contact us for details.

Contact Panalysis
Tel: 1300 368 553 (Aus)
+61 2 8001 6330 (Int)
Email

Getting Results from your Website

Download our free report. Getting Results from your Website



Google Analytics & Web Marketing Tune-up

Get your advertising and Google Analytics working correctly with our Google Analytics tune up.

Free Advice

Subscribe to Web Business Results and get free tips on how to improve your website.



Services: Google Analytics Support | Google Mini | Web Analytics Training | Search Engine Optimisation Audit