For some time now I have used Google AdSense. For about the same amount of time I have used Google Analytics. You are supposed to be able to link the two accounts so that Google Analytics can show you your AdSense data and statistics in greater detail. I was able to get my AdSense and Analytics accounts to link, but Analytics would never actually track any AdSense data (i.e., it would always show all zeros).
Note that previously I had already added the following line of code as well (per the suggestions of all the other “fixes” that didn’t actually work). The following line of code therefore might not actually be necessary, but it may be possible that it is needed in addition to the fix above. You may as well add both lines of code just to be safe.
google_analytics_uacct = "UA-xxxxxxxx-x";
If that was all confusing, hopefully this will clarify. In the end, my ad code for each ad on my pages changed as follows, the top showing the old code and the bottom showing the new fixed code (fill in the x‘s with your actual account-related numbers):
Note that I use the domain name “
.mike-thomson.com” for the
google_analytics_domain_name variable. I used the “.” in front of the domain because that is what my Analytics code used for its domain name setting. It is likely that yours will not include the leading “.” (just check what your Analytics-generated code has for its setting and then match that).