• Resolved catwingz

    (@catwingz)


    Hi, this website has two different sets of issues.

    The first has to do with mixed messages/results regarding the code to insert in the header.php. I had all of the Google Tag Manager code added before adding your plugin and wonder if my experience with this site would be different if I had added followed my previous pattern of adding your plugin first. While customizing the banner in the app I kept getting messages that the plugin hadn’t been added yet and to add this code, but not if I had already added the plugin. First I tried adding the code from https://www.cookieyes.com/documentation/google-consent-mode-v2-integration-with-cookieyes-wordpress-plugin/ The error message persisted so I finally disregarded the “do not install if I had already installed the plugin” code and added what the error message demanded anyway. I’ve used your plugin multiple times and this is the first time I have encountered this code to start the banner.

    With this part there are are two concerns – first, should the code have both of your sections of code? and why are the changes I have made to customize the appearance of the banner still not showing on the public side of the website?

    This is now what the modified portion of the header.php looks like:

    <?php
    /**
    * clean_magazine_before_wp_head hook
    *
    * @hooked clean_magazine_head – 10
    *
    */
    do_action( ‘clean_magazine_before_wp_head’ );

    wp_head(); ?>
    <script>
    window.dataLayer = window.dataLayer || [];
    function gtag() {
        dataLayer.push(arguments);
    }
    gtag("consent", "default", {
        ad_storage: "denied",
        ad_user_data: "denied", 
        ad_personalization: "denied",
        analytics_storage: "denied",
        functionality_storage: "denied",
        personalization_storage: "denied",
        security_storage: "granted",
        wait_for_update: 2000,
    });
    gtag("set", "ads_data_redaction", true);
    gtag("set", "url_passthrough", true);
    <!-- Google Tag Manager -->
    <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
    new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
    j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
    'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
    })(window,document,'script','dataLayer','GTM-TMF8DB6H');</script>
    <!-- End Google Tag Manager -->
    </head>

    The other set of issues relates to uncategorized cookies from tripadvisor and jscache.com. Thus far I have found it to be a waste of time to contact the sources of this sort of cookie. Even if they respond and declare them to be necessary, no action is taken and no information like a script URL pattern is given. What are the consequences of just leaving them the way they are?

    Thank you

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter catwingz

    (@catwingz)

    Is there code which would automatically block cookies which lack a sccript URL pattern? That looks like the only strategy which could work.

    Plugin Support CookieYes Team

    (@cookieyesteam)

    Hi @catwingz,

    Greetings from CookieYes!

    Please remove the CookieYes script you have manually added to your site. While using the plugin, you shouldn’t add the CookieYes script manually as it will get injected by the plugin.

    Also, please add the custom consent mode script and GTM scripts above the wp_head() function call in your header.php file.

    Script URL pattern will vary with a cookie. It will be common for cookies only if they get set from the same script.

    The cookies without the Script URL pattern will get set at first and will get deleted once the banner is loaded. The script which sets the cookies won’t get blocked in this case.

    Thread Starter catwingz

    (@catwingz)

    Hello, Initially the banner was showing but not with the color customization I had added. Then, as instructed, I removed the code to start the banner and the banner is now no longer visible. That’s a problem. To recap, this is the code in the head tag of the header.php: (minus the comments – a shame they removed the provision for code)

    “<?php
    /**
    * clean_magazine_before_wp_head hook
    *
    * @hooked clean_magazine_head – 10
    *
    */
    do_action( ‘clean_magazine_before_wp_head’ );

    wp_head(); ?>
    <script>
    window.dataLayer = window.dataLayer || [];
    function gtag() {
        dataLayer.push(arguments);
    }
    gtag("consent", "default", {
        ad_storage: "denied",
        ad_user_data: "denied", 
        ad_personalization: "denied",
        analytics_storage: "denied",
        functionality_storage: "denied",
        personalization_storage: "denied",
        security_storage: "granted",
        wait_for_update: 2000,
    });
    gtag("set", "ads_data_redaction", true);
    gtag("set", "url_passthrough", true);
    <!-- Google Tag Manager -->

    so, problem #1 – the banner has now disappeared; #2 – the color customization wasn’t showing; #3 – how to deal with uncategorized cookies for which a script url pattern is not going to be available.

    thank you

    Plugin Support CookieYes Team

    (@cookieyesteam)

    Hi @catwingz,

    As we have already suggested in the previous reply, please add the custom consent mode script and GTM scripts above the wp_head() function call in your header.php file.

    Also, we could find an extra consent mode script at line 369. Please remove this code or else it might interfere with the functionality.

    The script URL pattern is the pattern of the script from which the cookie is set. So, all cookies set from JavaScript will have a Script URL pattern.

    If you have server-side cookies on your site, you should handle them separately by referring to this documentation.

    We couldn’t replicate the issues, #1 – the banner has now disappeared; #2 – the color customization wasn’t showing; on your site.

    Plugin Support CookieYes Team

    (@cookieyesteam)

    Hi @catwingz,

    This thread has been inactive for a bit, so we are going to mark it as resolved now. Please feel free to open a new thread or follow-up if you have any further questions or still need help.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Installation/Setup Issues’ is closed to new replies.