• Resolved manevilhena

    (@himidia)


    Hi,

    I am using the CookieYes WordPress plugin. The app shows the Cookie Banner status as “Active”, but I am struggling to follow the Method 2 for implementing the Consent Mode Script.

    When I added the CookieYes GA Consent Mode Script to my header using WPCode Plugin, it is not possible to determine the position of the script to be above the GTM script.

    Also at my website, the GTM Script was added using the GTM4WP plugin, so I cannot determine the position of the GTM Script in the header too.

    So I have the plugin and app active, but cannot find a way to set those scripts in the correct order, since they are all fired directly from the plugins (GTM4WP, CookieYes)

    I tried to just hardcode the CookieYes GA Consent Mode Script in my header.php file, but i don’t think it will work, since there are no other scripts there.

    Can you guys help me?

    Thanks,

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

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support CookieYes Team

    (@cookieyesteam)

    Hi @himidia,

    Greetings from CookieYes!

    Please exclude the CookieYes script from the js optimisations in the WP Rocket plugin by referring to this documentation.

    You can enable the option “Allow Google tags to fire before consent” from CookieYes dashboard > Advanced Settings > Google consent mode (GCM) and now the order of the GTM script won’t be an issue.

    Now, please add the Custom Script manually without using any plugin to ensure its position. You can add it above the wp_head() function in your active theme’s header.php file.

    Thread Starter manevilhena

    (@himidia)

    Thanks for the reply! I managed to exclude the script from JS Optimizations at Wp-Rocket and also enabled “Allow Google tags to fire before consent”.

    I have also hardcoded the scritp at my main header file ( before wp_head() )

    How can I be sure everything is working?

    Thanks

    Plugin Support CookieYes Team

    (@cookieyesteam)

    Hi @himidia,

    CookieYes script is not excluded from all the js optimisations done on the WP Rocket plugin. So please make sure that you add the exclusion pattern in all those fields. After doing this, also make sure that you clear the cache.

    To verify the integration of Google Consent Mode with CookieYes on your website from your end, you can follow these steps:

    1. Go to your Google Tag Manager (GTM) account.
    2. Click on the “Preview” button located at the top right corner of your GTM account. This will activate the Preview and Debug mode.
    3. Visit your website in a new browser tab.
    4. You should see the GTM Debug Console at the bottom of your website. This console will provide information about the tags that are firing on your site.
    5. Interact with your website, and observe the tags firing based on the user’s consent status.
    Thread Starter manevilhena

    (@himidia)

    Thanks! Yes, I have now excluded this JS from all the 3 options (Minify JS files, Load JS deffered, Delay JS execution) and cleared WP-Rocket cache.

    But I can’t see this tag being fired at GTM Debug Console.

    Since I was testing the Consent Banner before and pressed “Accept All” , the cookie banner is not showing anymore and I cannot test if the tag is being fired at GTM.

    Plugin Support CookieYes Team

    (@cookieyesteam)

    Hi @himidia,

    We couldn’t replicate this issue on your site. So, could you please share a screen recording of the same privately via this link?

    Thread Starter manevilhena

    (@himidia)

    Hi, I will send you a private email with the screen recording !Thanks

    Plugin Support CookieYes Team

    (@cookieyesteam)

    Hi @himidia,

    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 7 replies - 1 through 7 (of 7 total)
  • The topic ‘GA Consent Mode Script in the header’ is closed to new replies.