Possible Google Consent Mode Script Injected by RankMath?

#1031001
  • Resolved LA Theriault
    Rank Math free

    I was advised by my hosting provider (BigScoots) to contact you regarding a Google Consent Mode script that appears on my website. My traffic has recently flatlined, and upon inspection, they found the following script loading before Google Tag Manager:

    gtag(‘consent’, ‘default’, {
    ad_storage: ‘denied’,
    analytics_storage: ‘denied’,
    functionality_storage: ‘denied’,
    personalization_storage: ‘denied’,
    security_storage: ‘granted’
    });

    BigScoots believes this may be coming from RankMath, but when I check the Analytics settings in the plugin, I haven’t connected my Google account, and I’m not using RankMath to manage GA tracking.

    Could you please clarify:

    Does RankMath inject this Consent Mode script even if Google Analytics is not connected?

    If so, how can I disable or modify it so it doesn’t interfere with CookieYes, which is currently managing Consent Mode on my site?

    Could this script be causing Google Analytics not to fire, resulting in no traffic showing up?

    Thank you for your help!

    Best regards,
    Lisa Theriault
    ageingup.com

Viewing 1 replies (of 1 total)
  • Hello,

    We apologize for the issue you are facing regarding the Google Consent Mode script on your website. Thank you for raising this concern.

    To address your questions:

    1. Does Rank Math inject this Consent Mode script even if Google Analytics is not connected?
      Rank Math does not inject the Google Consent Mode script if you have not connected your Google account or enabled the Analytics module. The script you mentioned is typically associated with Google Analytics tracking, and if you haven’t set it up through Rank Math, it should not be present.

    2. How can I disable or modify it so it doesn’t interfere with CookieYes?
      Since you are using CookieYes to manage Consent Mode, we recommend checking the settings in CookieYes to ensure it is configured correctly. If Rank Math is not managing your Google Analytics, then it should not be injecting any scripts related to it. However, if you suspect that Rank Math might still be affecting it, please ensure that all relevant modules in Rank Math are disabled under Rank Math SEO → Dashboard → Modules.

    3. Could this script be causing Google Analytics not to fire, resulting in no traffic showing up?
      Yes, if the Consent Mode script is set to deny storage for analytics, it could prevent Google Analytics from firing correctly, leading to no traffic being recorded. This is especially true if the script is loaded before Google Tag Manager, as it may block the analytics tracking from executing.

    If you continue to experience issues or if the script persists despite these settings, please reply to this ticket with your site URL so that a human agent from our support team can assist you further.

    Thank you for your understanding, and we hope to resolve this matter swiftly for you!

    Sources:
    Making the Most of the Analytics in Rank Math

    This is an automated reply from Rank Math Support Bot. If you need further assistance, please reply to this topic and a human support agent will reply to you shortly.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 1 replies (of 1 total)

The ticket ‘Possible Google Consent Mode Script Injected by RankMath?’ is closed to new replies.