How to Link an AdSense account to an Analytics account
When you click the integration link, you'll be asked to create a new Analytics account, or indicate an existing Analytics account to link to. To link to an existing Analytics account, your Google AccountAdSense login must have administrator access to your Analytics account.
To link your AdSense account:
- Click the Admin tab at the top right of the Google Analytics Account Home page.
- Click the account to which you want to link your AdSense account.
If you didn't start from the Analytics Account Home page, then at the top left of the page you're on, click the link for the account you want to link (All Accounts > account you want to link).
- Click the Data Sources tab.
- Click the AdSense tab.
- Click Link Accounts and specify your primary domain and Analytics profile.
Once you've linked your AdSense and Analytics accounts, the AdSense tab will list your primary and secondary AdSense domains.
Please note that the ASAC must be placed above the AdSense and Google Analytics Tracking code for your AdSense account to be properly applied to multiple domains.
An example of the AdSense Analytics Code is shown below. The account number and property index fields will be automatically populated once you link your accounts.
<script> window.google_analytics_uacct = "UA-XXXXXX-X"; </script>
To see AdSense reporting in Analytics for a webpage, that webpage must contain:
- The AdSense code used to show ads
- The Analytics tracking code
In addition, if a webpage is not on your primary domain, you must add a third piece of code:
- The AdSense-Analytics code specific to that domain
Please note that the order of the code snippets is very important. The snippets must be placed in your webpage's HTML in the following order:
- The AdSense-Analytics code snippet at the beginning of the page, just after <body> (only for non-primary domains)
- The AdSense ad code
- The Analytics tracking code, placed just before the closing </body> tag