A jQuery plugin that helps track in one Google Analytics profile links across multiple domains.
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:[ 'blog.mysite.com', 'store.mysite.com' ],

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


Original blog post for the xdomain Javascript snippet: