• Hi,
    I need help. I would like to activate the Cookie Banner from CookieYes on my site. I am prompted to do this:

    “Copy this script and paste it between the <head> and </head> tags of your website.
    We recommend you add it right after the <head> tag before any other scripts to ensure proper blocking of cookies prior to consent.”

    I thought of using your plugin, which I had already installed on my site, to do what is required of me. Only, being very inexperienced, I don’t know how to do it. Could you please help me with the code? I would be very grateful because I really don’t know where to start.

    Thank you in advance for your help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter talkiewalkie

    (@talkiewalkie)

    Hi, I tried to install the cookie banner using your plugin. This is the code I used:

    add_action( 'wp_head', function () { ?>
    
    	<!-- Start cookieyes banner --> <script id="cookieyes" type="text/javascript" src="https://cdn-cookieyes.com/client_data/c767f392bf1b39bfd759329b/script.js"></script> <!-- End cookieyes banner -->
    
    <?php } );

    I’m not sure if it worked as it should, though, because google gives this error: “wpmGoogleInlineScripts.js:-122 wpm is not defined. That means you are deferring the script which you shouldn’t. wpm must be loaded before the inline scripts run. Visitor tracking will continue to work, but visitor cookie consent will be ignored.”

    Can you help me? Could it depend on the code I used to integrate the banner? The code I used I found here on the support forum of your plugin.

    Plugin Author Shea Bunge

    (@bungeshea)

    Hi talkiewalkie,

    Try using the wp_footer hook instead:

    add_action( 'wp_head', function () { ?>
    
        <!-- banner code here -->
    
    <?php } );
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Cookie banner between the head tags’ is closed to new replies.