Track multiple AdSense domains in a single Analytics view

You can configure your Analytics tracking code to report on multiple domains in a single view as if they were a single domain; this functionality works with AdSense reports in Analytics too. Here's how you do it.

First, you'll need to set up your Analytics tracking code to report on these multiple domains in a single view by following the instructions in the Analytics Help Center.

The code referenced in that article requires you to add two lines of code that looks like this to all of your webpages:

_gaq.push(['_setDomainName', 'YOUR-WEBSITE-URL']);

_gaq.push(['_setAllowLinker', true]);

If your primary property for AdSense reports in Analytics is among the multiple domains you wish to track in one view, make sure that this line uses the domain identifier ("UA-XXXXX-X") of your primary property. (You can find this identifier in the code for any view for your primary property.) Once you have done that, you do not need to add any further code.

However, if your primary property is not among the multiple domains, you'll have to add an AdSense Analytics code snippet to all webpages on the domains. Make sure that the domain identifier in the line of code above ("UA-XXXXX-X") is the same as the domain identifier used in the AdSense-Analytics code.