Where do I put page level ads code?

Posted in: Newspaper
Post count: 57

Google Adsense has started page-level ads. Where do I put them in Newspaper site to enable them. Here are the instructions at google adsense:

Place this ad code in the <head> tag (or at the top of the <body>) of the pages where you want to show the ads. It’s the same ad code for every page and site, and you won’t need to change it even if you adjust your Page-level ads settings.

Here is the link for more details:
https://support.google.com/adsense/answer/6245307?hl=en&utm_source=aso&utm_medium=link&utm_campaign=ww-ww-et-asfe_

<script async src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: “ca-pub-XXXXXXXXXXXXXXX”,
enable_page_level_ads: true
});
</script>

Post count: 23312

Hello sanjeev,

For more information about page level ads implementation, please check this topic here -> https://forum.tagdiv.com/topic/page-level-ads-problems/ If your code is not working after you have followed this steps, please contact the Google because they should be able to provide a more accurate response regarding to the code.

Thank you for your understanding!

Post count: 65

If you’re running the new mobile theme you will also have to place there, mine weren’t working until I found the mobile header sheet and placed code there.

Post count: 23312

Hello taco_and_co,

Please notice that this implementation for page-level-ads is not tested for our new mobile theme and we cannot say for sure that will work for this, sorry!

Thank you for your understanding!

Post count: 65

It works once I added the code in the mobile/header.php template.

Also people, if you are using a Google Tag Manager plugin don’t forget to add the code in as well, otherwise no mobile traffic will show in analytics.

Viewing 5 posts - 1 through 5 (of 5 total)
The forum ‘Newspaper’ is closed to new topics and replies.