DDMSEO - Full Stack Developer based in London

Optimize your website SEO with X-RAY SEO Auditor

Published: 2nd May 2017 | Words: 305 | Reading Time: 2 minutes

Categories / Tags:

Development
Google Adsense

Why you should test Adsense

Testing is an integral part of building anything and Adsense ads are no different. When you integrate Google Adsense into your website during development you will need to test them to make sure they render on your page as extpected. An issue can occur where reloading your pages during testing can give extra Adsense ad impressions and in turn bloat your Adsense ad perforamce data leading to skewed statistics. Lucky Adsense provides an option to enable a test mode that does not impact your data.

Enabling Adsense test mode

Add the following to your adsense code block to enable test mode (dont forget to disable when your ads go live).

data-ad-test="on"

<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
   <!-- MY AD - 01/01/2017 -->
   <ins class="adsbygoogle"
      style="display:block"
      data-ad-test="on"
      
data-ad-client="ca-pub-0000000000000000"
      data-ad-slot="0000000000"
      data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

Rate this article

Average: 0.00 out of 5 / Votes: 0

Comments

Please login or register to post comments

Login | Register