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 property, you must add a third piece of code:
- The AdSense-Analytics code specific to that domain
We recommend that you place the snippets in your webpage's HTML in the following order:
- The Analytics tracking code, placed just before the closing </head> tag
- The AdSense-Analytics code snippet just after the <body> tag (for non-primary properties only)
- The AdSense ad code, between the <body> and </body> tags
<!DOCTYPE html>
<html>
<head>
<title>Webmaster quality guidelines - AdSense Help</title>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXX-Y']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>
<script>
window.google_analytics_uacct = "UA-accountnumber-propertyindex";
</script>
<h1>Webmaster quality guidelines</h1>
<p>In order to ensure a good experience for users and advertisers, publishers participating in the AdSense program are required to adhere to the webmaster quality guidelines. These guidelines provide many tips for creating sites that help Google find, index, and rank your site. In general, following these tips will help you to provide a positive experience for your users. The guidelines are quite extensive so we’ve highlighted some important information below:</p>
<script type="text/javascript"><!--
google_ad_client = "ca-pub-xxxxxxxxxxxxxxxx";
/* Homepage - 728x90 */
google_ad_slot = "2644871640";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</body>
</html>
