Ad settings and EU Cookie Law

Posted in: Newspaper
Post count: 24

Hi,

In Italy, following the European Cookie Law, is required to not install cookie before the user consent.

I’m using a plugin to do that but i’ve problem with adsense ads. I use the newspaper theme panel section to insert the ads, and as required by the “Cookie Blocker” plugin i wrapped the adsense code with special comments (COOKIE_POLICY_BEGIN, or END). The code is now like that:

<!–COOKIE_POLICY_BEGIN–><script async src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script>
<!– Adsense2 –>
<ins class=”adsbygoogle”
style=”display:block”
data-ad-client=”——-”
data-ad-slot=”——-”
data-ad-format=”auto”></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script> <!–COOKIE_POLICY_END–>

I contacted the developer of the plugin because it doesn’t work. He analyzed the website and discovered that the theme was remomving the “Special comments”. He suggested me to use a plugin (like Quick adsense) to insert banner on my webiste and indeed using that the ads are blocked before the user consent.

I prefer to use the Newspaper Theme Panel to insert ads and not another plugin Can you help me ? Why the theme is removing the “special comments” ?

Post count: 6600

Hi,

The theme renders the adsense code, checks the devices on which your site loads and returns a banner according to the screen width, that’s why your tags are removed. Try to add your comments like this: http://screencast.com/t/z4xe1e16H9http://screencast.com/t/1kl8xB7AyHhttp://screencast.com/t/pa9MeBMJf8e

$buffy .= "\n <!–COOKIE_POLICY_BEGIN–> \n\n";

$buffy .= "\n <!–COOKIE_POLICY_END–> \n\n";

Hope this helps!
Thanks for the message!

  • This reply was modified 10 years by Lucian.
Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newspaper’ is closed to new topics and replies.