Search Images Maps Play YouTube News Gmail Drive More »
Sign in

Reports & earnings

Using Google Analytics with AdSense

Track multiple AdSense domains in a single Analytics profile

You can configure your Analytics tracking code to report on multiple domains in a single profile 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 profile 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 profile, 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 profile 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.

Tell us how we're doing - Answer five short questions about your help center experience

Be sure to sign in to your account for a more customized Help Center experience.