Analytics Market Chart

Automatically Tag Downloads, Outbound Links and Cross-Domain

Automatic Link Tagger Script

Automatically track outbound links, downloaded files, mailto links and cross-domain tracking with LinkTagger. This script goes on every page of your website, and it replaces the need to manually tag every link on your site.

LinkTagger works by looking at every anchor tag, form and iframe on a page and determining whether it should be tagged with code. It reads plain HTML code. It cannot read Flash or JavaScript links.

LinkTagger is completely customizable. The wizard below will generate the code that you place on each page directly beneath your Google Analytics tracking code.

Download current version of linktagger.js.

More information about LinkTagger

Linktagger Wizard

This form will create the code to put on each page of your site. Instructions on how to customize the code are also in the linktagger.js file itself.

Code Version

Which version of the code are you using?

Cross-Domain Tracking


Downloads


Outbound Links


Mailto Links


Code

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

</script>

Instructions

  1. Download and unzip the linktagger.js file, and install it at the root of your site.
  2. Place the above code onto every page of your site after the Google Analytics tracking code.
  3. If there are GET forms that link to other domains - Add two functions to the onSubmit event for each form:
    • createLinkerUrl(this) must come first
    • return formLinker(this) must come after any other function in the event

Important

LinkTagger is in beta. We strongly encourage you to test the code on a test or QA version of your site before launching it on your live site. You can put the code into test mode simply by adding the line linkTagger.setTestMode(true) before the tag() method. This will create popups every time a link is clicked that it would tag, and it shows exactly what it would report to Google Analytics.
Actual Metrics is not responsible for any loss or damage incurred by using this script.