Skip to content


Subversion checkout URL

You can clone with
Download ZIP
A jQuery plugin that helps track in one Google Analytics profile links across multiple domains.
Branch: master
Pull request Compare This branch is 7 commits ahead, 1 commit behind lunametrics:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.

Cross-domain Google Analytics

The plug-in lets you automatically track links between different related domains using the same Google Analytics profile.

To help properly track links between different domains and subdomains, Google provides a guide on their Analytics page. As it gets tedious very quickly to set it up by hand, this plug-in helps automate the process and track all links for specified domain names.

This plug-in is a fork of xdomain wrapped in a jQuery plugin, with many a modification.


// Track all links inside #content
    // Add GA tracking to links for these domains
    domains:[ '', '' ],

    // Include tracking of downloads for these filetypes
    file_types: [ '.xls', '.exe' ]


Original blog post for the xdomain Javascript snippet:

Something went wrong with that request. Please try again.