Support » Plugin: Cookie Notice & Compliance for GDPR / CCPA » Adding AdSense not working

  • I tried to add the AdSense script but the plugin keeps removing my client id from the script!? Why is that happening?
    Needless to say that no ads are shown after accepting the consent.

    <script data-ad-client="ca-pub-0123456789" async src=""></script>

    “data-ad-client” is what gets removed after I save the settings.

Viewing 1 replies (of 1 total)
  • Hi there,
    if you use the functions.php file in the child theme, this works:

    if ( function_exists('cn_cookies_accepted') && cn_cookies_accepted() ) {
        // Your third-party non functional code here

    as present in the homepage plugin.
    Or perhaps do you use [COOKIE]your codex[/COOKIE] ?

Viewing 1 replies (of 1 total)
  • The topic ‘Adding AdSense not working’ is closed to new replies.