Configuring an Adsense Account on Multiple Analytics Profiles
I know it sounds easy to achieve but it took quite a bit of fiddling around to figure out how to get my AdSense account to track properly on multiple Analytics profiles (the primary profile I’ve had running fine but when I wanted to track a secondary profile on a Google Analytics Dashboard it proved more difficult). I shall explain how I finally got it working, in this case on 2 WordPress sites (but the process can obviously be used for non-WordPress sites too).
- If you haven’t already done so, you’ll need to set up an Analytics and AdSense account and link the 2 accounts. To do this click the link inviting you to do so in the home tab of your your AdSense account. If you have done so already there should be a link saying “View performance in Google Analytics” on the right of this page.
- If you haven’t already done so set up Adsense ads on the relevant websites. It is important to add a small line of code to your Adsense banner code in order to track the right profile. All you have to do is to add this line:
window.google_analytics_uacct = "UA-xxxxxx-xx";
To the banner code near to top, so that the banner code looks something like this:
- If you haven’t already, set up the Analytics profiles for the websites you want to track and enter the tracking code in the head of every page of the relevant websites and verify them in Analytics. FYI; for WordPress sites I use the plugin called Google Analyticator, within Analyticator you need to enter the UA tracking number but usefully you also have the option for the Google Adsense ID number. If you aren’t using Analyticator or WordPress you will need to add the below line to to top of your Analytics code:
- If you are able to, use the old version of Google Analytics as it is easier to find things (the link to toggle is at the top of the page – but for how much longer nobody knows)! Edit each of the “Main Website Profile Information” settings and tick the “Yes, this profile should receive AdSense data” check box. One of the profiles will be your primary one and the rest will be secondary. When you tick this check box on any secondary profile a text area will appear saying “Paste this code at the top of any webpage in this domain that contains AdSense ads. Be sure to leave the Google Analytics tracking code at the bottom of your pages.“
- That’s it… Now when I set this up it took me a few days to believe it was actually working i.e. until I got accurate click through information on both my Analytics and AdSense accounts on both profiles. Be patient it does work. FYI click testing your AdSense links yourself won’t usually be registered by Google and you may do so and think the code isn’t working… so you will have to wait for genuine clicks. Please note I think that click testing myself caused my Analytics to register the clicks but the value was always $0.01 – very strange.
If anyone is having issue with this please let me know and I’ll take a look and help if I can. Similarly if you have any questions please enquire below.