Analytics & Testing

One Google Analytics Account, Multiple Domains

If you’re a franchise corporation, you might have multiple domains or subdomains but you wish to track traffic across all of them. This is possible by adding another profile within Google Analytics and appending a second profile tracker.

ORIGINAL Code Sample:

<script type="text/javascript">
try {var pageTracker = _gat._getTracker("UA-111111-1");
} catch(err) {}

NEW: Asynchronous Google Analytics Code Sample:

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-12345-1']);
_gaq.push(['_setDomainName', '']);
_gaq.push(['_setAllowLinker', true]);
(function () {
var ga = document.createElement('script');
ga.type = 'text/javascript';
ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(ga, s);

A few weeks ago I did some digging in Google Analytics and they actually promote the method of adding profiles to filter data as well. Perhaps you want to observe how many people visit your site from within your company versus external visitors. You can add a filter for your IP addresses on one profile (limiting traffic to just the external) and then compare the two accounts.

Download a Sponsored Marketing Whitepaper:
9 Reasons Why You Shouldn't Settle for Traditional Cloud File Sharing

9 Reasons Why You Shouldn't Settle for Traditional Cloud File Sharing

To help deliver the content sales demands, many companies turn to cloud-based storage solutions like Dropbox and Google Drive. However, these solutions are often lacking critical features. Download Now


  1. 1
  2. 3

    Great site ! Good to see a fellow Indiana resident (I am a South Bender) hit AllTop. Got you bookmarked — see you after my first Blog is installed. Have some fun @ Blog Indiana. Hope you have time to go get the seal, for your sites, it's $10/mo. w/ a ltd. sign-up time. It will be big w/ Mike Dillard behind it; and many top MLMers in the site. B)