Sign in

GDPR Cookie popup issue

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #3228
    t.martin

    Hello Publii team!

     

    I am looking into Publii as a CMS of choice for our new website. Everything works well enough, except for the GDPR Cookie popup. I have the latest version of the used Theme (customised heavily) but I cannot seem to get the cookie to disable.

     

    I have a custom <script> inside the custom HTML section, where Google Analytics is called. I read through the documentation and am not sure where to place the {{ gdprScriptBlocker }}. Also I am confused by when you state to “catalogue and separate” scripts into groups, how would do that? The link on your site pointing to the Disqus.hbs implementation of this is giving back a 404 error, and I have been unable to find an answer on the forums.

    Warmest regards

    #3231
    BobBob
    Support

    I think all needed info can be found in our docs  https://getpublii.com/dev/prepare-theme-gdpr-compliant/

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #3238
    t.martin

    Hi Ben,

     

    I have tried to follow the docs, but could not get the cookie disabled which led me to my post. Let me try explain a bit better

    Inside Custom HTML => Head:  I have the Google Analytics script

    <script async src="https://www.googletagmanager.com/..."></script>
    <script `type="{{ gdprScriptBlocker "analytical"}}"`> //Google analytics code here </script>

    Within my index.hbs file I am including {{{ publiiFooter }}} before the closing </body> tag of the page to allow for GDPR cookie handling.

    When I inspect the site, the Google Analytics cookie is still present regardless of whether the proper checkbox is selected or not.

    Hope this explains it a bit better.

    #3239
    BobBob
    Support

    Helpers do not work via Custom HTML code, you have to edit the source theme files ‎⁨(Documents ▸ ⁨Publii⁩ ▸ ⁨sites⁩ ▸ ⁨YOUR_SITE ▸ ⁨input⁩ ▸ ⁨themes⁩ ▸ ⁨YOUR_THEME)

    To preserve the custom code changed from being overwritten the next time your theme is updated, please make sure you have created override files, which are essentially copies of the existing theme files and are stored separately → https://getpublii.com/dev/theme-overrides/

     

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #3240
    t.martin

    Hi Bob,

     

    Thank you! That works like a charm now. Just one more question, once you choose to disable a cookie script again (after enabling it) the cookie remains shown within the Dev Tools (Chrome, Firefox).  Is this expected behaviour, or does Publii handle deleting the cookie as well?

     

    Once again thank you so much for the advice!

    #3247
    BobBob
    Support

    Hi,

    Did you delete all cookies before testing?

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #3251
    t.martin

    Hi Bob,

    Yes I did. I cleared out my entire cache and deleted cookies.

    I ran the site with the cookie disabled – no cookie showing in the dev console.

    I selected the cookie to enable it, hit save – cookie appeared in dev console as expected.

    I unchecked the cookie to disable it again, hit save – cookie remains inside the dev console on reload.

    However when I manually deleted the cookie it did not re-appear unless enabled again, so it might just be a hanging around but not actually running.

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.