How to railroad train Page-level AdSense ads inward your weblog

This article describes Page-level ads, a novel type of AdSense promotion which Google has lately introduced.   It includes how to develop these ads if yous purpose Blogger, together with roughly troubleshooting information close them.  

It too describes how to cook an fault inward the code which is supplied, which causes a message similar "Attribute shout "async" associated amongst an chemical component type "script" must travel followed past times the ' = ' character".



What are Page Level AdSense ads

Google has lately introduced a novel type of Adsense ad-units, which may travel shown to people who see a website using a mobile device (eg smartphone of tablet),

There are ii types of Page-level ads:
  • Vignette ads:   When a visitor on your site clicks on a link to roughly other page on yous site, a vignette promotion may travel loaded every bit a full-page overlay which the user needs to unopen earlier they come across the page which they navigated to.
  • Overlay ads:   these are smaller ads which present at the travel past times or bottom of your screen, together with which "stick" to the edge, thus they appear to remain inward house every bit the user scrolls upwardly together with downward your site.   The see may click on them inward the commons way.

For Blogger users, these ads are solely currently available if yous accept a amount AdSense account: if yous solely accept a hosted AdSense account, thus yous cannot larn the code to install them.   But if yous practise accept a amount AdSense line organisation human relationship (either because yous accept a custom domain, or because yous signed upwardly for AdSense earlier the "host AdSense account" pick was introduced), they are attractive because they don't count towards the count of advertisement-units which yous are allowed to display on each page.

They too solely operate if yous accept a mobile subject switched on for your blog, thus that visitors who purpose a mobile device come across mobile-optimised screen.


How to install AdSense Page Level ads inward Blogger

Log inward to your AdSense account.

Go to the My Ads tab

Turn on i or both of  Overlay or Vignette ads options.
(By default, they are both turned Off.    Click on the empty box beside the "0" to plough an pick to  on:  in these controls, 0 agency "off" together with 1 agency "on".)




Click the < > Get Code button.

Copy the code that is generated.

Switch to Blogger, together with edit your theme in the commons way.

Find the text   <head>    (including the brackets).

On the rattling adjacent line afterward <head>, paste in your code.

Optional - but highly recommended - add comments to clearly present what this code is for.   I normally use
<!-- START ADSENSE PAGE LEVEL ADS -->
together with thus the code goes inward hither ...
<!-- END ADSENSE PAGE LEVEL ADS -->
Preview the theme, together with make certain it's working.
(See Troubleshooting department below if yous larn a message close   Attribute shout "async" associated amongst an chemical component type "script"    or similar.

Save the theme.



Job done!   This is all yous involve to practise to enable page-levels ads for your blog:   yous practise non involve to install gadgets to state where these ads go, because Google handles this for you.


How to come across what page-level ads await similar inward your blog

Visit your weblog using a smartphone or tablet.

Add the text   #googleads   at the terminate of the website address, thus it changes from something like:
https://magictrikss.blogspot.com/?m=1
to something like:
https://magictrikss.blogspot.com/?m=1#googleads

After this, when yous click on a link to movement a dissimilar page inward your blog,  a Vignette way promotion volition display - these are whole-page ads, which include a "close ad" button, similar this:



Troubleshooting

Extra "src" text inward the ad-code

Right now, in that place is a occupation amongst the code that AdSense are providing.   I don't know if this is because Blogger doesn't sympathise a characteristic that AdSense is using, or if it's a genuine bug.    But if yous come across a message similar this when yous elbow grease to preview the theme:
Could non charge subject preview: Error parsing XML, line 21, column 15: Attribute shout "async" associated amongst an chemical component type "script" must travel followed past times the ' = ' character.
thus there's a rattling uncomplicated alter that yous accept to make.

All yous accept to practise is delete the "src" straightaway afterward the discussion async.

So your code changes from similar this:
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
  (adsbygoogle = window.adsbygoogle || []).push({
    google_ad_client: "ca-pub-DONT-USE-MY-NUMBER-GET-YOUR-OWN-PUBLISHER-ID",
    enable_page_level_ads: true
  });
</script>

to similar this:
<script async ="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
  (adsbygoogle = window.adsbygoogle || []).push({
    google_ad_client: "ca-pub-DONT-USE-MY-NUMBER-GET-YOUR-OWN-PUBLISHER-ID",
    enable_page_level_ads: true
  });
</script>

Different Page Level settings for dissimilar websites

If yous are using Adsense across several dissimilar websites, thus yous may desire to enable i of vignette or overlay ads on roughly sites, together with a dissimilar pick on others.

Currently, in that place is no way to practise this:  you must withdraw i combination of:
  • No Page Level ads
  • Overlay ads only, no Vignette ads
  • No Overlay ads, but practise present Vignette ads
  • Allowing Google to withdraw Overlay and/or Vignette ads

Stop Vignette ads beingness attached to roughly links

By default, whatsoever link to roughly other page inward your weblog may accept a Vignette promotion attached to it.    However in that place may travel roughly links which yous specifically don't desire this to travel on to - for trial if the user actually needs to think what was on the electrical flow page i time the larn to the adjacent one.

You tin foreclose whatsoever Vignette ads beingness displayed when a user clicks a link past times adding a tag to the link.

The tag to add together is:
data-google-vignette=”false”

together with yous involve to switch to Edit HTML (top left of the post-editor window) to add together it.

This is an trial link to roughly other page on this weblog which is prevented from having a Vignette ad, together with this is the HTML code I've used to accomplish this.
<a data-google-vignette=”false” href=" ">an trial link</a> 

More help

Google accept provided to a greater extent than information close Page marker ads here.



Related Articles

Setting upwardly a mobile subject for your blog

Editing your Blogger theme

Hosted AdSesne accounts for Blogger users

Popular posts from this blog

Putting a badge for a Facebook Page into your Blog

How to edit your Theme inward Blogger

Saving a shipping if Blogger's Publish push doesn't work