• 2dburnfenix

    (@2dburnfenix)


    I am using the FAZ Cookie Manager plugin on a WordPress website with the “Hospa” medical theme. I am trying to set up a delayed loading for the Yandex Metrika analytics script based on user consent, but I have encountered two critical issues:

    1. Ignored Banner Issue: When a visitor arrives at the site, the cookie consent banner appears. However, if the user ignores the banner (does not click “Accept” or “Decline”) and simply continues scrolling or navigating through the website, the analytics script remains blocked. Since they are actively using the site, I am losing a massive amount of traffic data. Is there a built-in feature or layout setting (like a full-screen overlay or modal backdrop) that forces the user to make a choice before interacting with the website content?
    2. Page Reload Failure: We tried implementing both methods from the documentation to handle user consent. When we use the direct tag modification approach:
      <script type="text/plain" data-faz-tag="analytics">...</script>
      The script gets blocked initially, but it completely fails to automatically fire or initialize upon page reload (F5) even if the user has already given their consent previously. The same happens when using the custom JS event listener (fazcookie_consent_update) — it fires nicely on the exact moment of the button click, but upon page refresh, the state is lost, or the event does not fire again, leaving the script inactive.

    Could you please advise on how to properly configure the plugin so that:

    • It forces a user decision or correctly tracks users who interact with the site without clicking the banner.
    • It successfully remembers the approved consent state and initializes the analytics script immediately upon page refresh (F5) without any manual code workarounds?

    Thank you for your assistance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author fabiodalez

    (@fabiodalez)

    Thanks for the detailed report. I checked the script restoration code, and the documentation gave you the wrong attribute. I am sorry for the time this cost you.

    Please replace data-faz-tag="analytics" with data-faz-category="analytics", keeping the type="text/plain" that you already used correctly:

    <script type="text/plain" data-faz-category="analytics">
      // Put your existing Yandex Metrika JavaScript here.
    </script>

    Use this opening tag for your existing Metrika script; the comment above is only a placeholder for its JavaScript, not a complete tracking snippet. The documentation has been corrected.

    Both attributes matter: type="text/plain" prevents the browser from executing the script before consent, and data-faz-category="analytics" tells the plugin which consent category controls its restoration. data-faz-tag is used for banner elements, not for this script-restoration mechanism.

    With the correct tag, the plugin is designed to run the script when analytics consent is granted and on subsequent page loads while that stored consent remains valid. No custom event listener is needed for this tagged script. The fazcookie_consent_update event fires when the visitor changes their choice; it does not fire merely because a visitor with saved consent reloads the page. That distinction does not mean the saved consent has been lost.

    On your first question: FAZ does not provide a setting that blocks access to the page until a choice is made. Scrolling or continuing to browse does not count as consent, so analytics requiring consent must remain blocked until the visitor explicitly agrees. A dialog offering both acceptance and refusal is not automatically the same as a cookie wall that requires acceptance to access the site; my earlier wording conflated those two cases.

    To make the banner more noticeable, you can use the “Dim the page behind the banner” option in the banner settings. It provides a visual overlay without blocking interaction with the page. It is available for Box corner, Box centered and Full-width Banner layouts, and is disabled for the Classic layout.

    One correction about reporting: the consent log records explicit consent choices, not individual visitors who saw the banner and never answered. If pageview tracking is enabled, the dashboard provides separate aggregate pageview and banner-view counts. Those counts do not identify unique visitors who ignored the banner and are not a replacement for Metrika analytics.

    If the corrected tag still fails after a reload, please share your FAZ Cookie Manager version, the affected page URL and how the Metrika snippet is inserted (theme settings, another plugin or custom code), so I can investigate your specific setup.

    • This reply was modified 1 week, 6 days ago by fabiodalez. Reason: Added the missing code example and corrected the explanations of consent, reporting and the original snippet
    Thread Starter 2dburnfenix

    (@2dburnfenix)

    Thank you, it helped

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

You must be logged in to reply to this topic.