Reputation: 379
I'm implementing google adsense on localhost using WAMP. I'm connected to the internet but when i check chrome dev tools, i get 403 error and no ads are displayed. I'm using localhost. The ads should appear instantly.
<script type="text/javascript">
google_adtest = "on";
google_ad_client = "ca-pub-XXXXXXXXXXXXX";
google_ad_slot = "2492102539";
google_ad_width = 160;
google_ad_height = 600;
</script>
I've tried asynchronous and synchronous(above) but the ads aren't showing and i get 403? How do i solve?
Upvotes: 2
Views: 3053
Reputation: 5
Just add google_adtest = on,
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-XXXX"
google_adtest = on,
data-ad-slot="XXX"
data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
Upvotes: 1
Reputation: 56
this is working with data-ad-test="on"
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-XXXX"
data-ad-test="on"
data-ad-slot="XXX"
data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
Upvotes: 1