I have multiple sites in my Google Analytics, and under the content section, adsense revenue per page is only visible for one of the sites. The rest of the sites in my Google analytics do not display what page the AdSense revenue came from.
Is this a known bug? Has anyone had this? Or do I need to configure something else?
Here is how I currently do this.
It is constructed as part of a php string, but the idea is the same. See the first 2 lines of this function. And the rest of the function displays traditional analytics snippet.
$str = '';
if($production === true)
{
$str.= '<script type="text/javascript">'."\n";
$str.= 'window.google_analytics_uacct = "UA-9425856-20";'."\n";
$str.= 'var _gaq = _gaq || [];'."\n";
$str.= '_gaq.push(["_setAccount", "UA-9425856-20"]);'."\n";
$str.= '_gaq.push(["_trackPageview"]);'."\n";
$str.= '(function() {'."\n";
$str.= ' var ga = document.createElement("script"); ga.type = "text/javascript"; ga.async = true;'."\n";
$str.= ' ga.src = ("https:" == document.location.protocol ? "https://ssl" : "http://www") + ".google-analytics.com/ga.js";'."\n";
$str.= ' var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(ga, s);'."\n";
$str.= '})();'."\n";
$str.= '</script>'."\n";
}
echo $str;