Automatically Tag Downloads, Outbound Links and Cross-Domain
Automatic Link Tagger Script
- Download and unzip the linktagger.js file, and install it at the root of your site.
- Place the above code onto every page of your site after the Google Analytics tracking code.
- 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
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.