Pop-up local storage is different for CMS pages

I have the top banner pop up appear for everypage. If someone closes it on one page it will not display for the rest. This is all working perfectly expect for the CMS pages. Such as:

These seem to be on a different local storage because the pop up reappears for those pages.
I am not very good at custom code and all the code I use is sourced from the internet. Any advice here would be great. This is the code I used for the popup:

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.js"></script>
$(document).ready(function() {

    $('.popup-overlay').css('display', 'flex');

    $PopUp = $('.popup-overlay');

    var hide = JSON.parse(localStorage.getItem('hide'));

    if (hide) {
    } else {
        // initialize value in case it hasn't been set already
        localStorage.setItem('hide', false);

    $('.closebtn').click(function() {
        $('.popup-overlay' ).hide();
        // toggle the boolean by negating its value
        var hide = JSON.parse(localStorage.getItem('hide'));
        localStorage.setItem('hide', !hide);

Here is my site Read-Only:

Here is site: https://grouporttherapy.webflow.io

1 Like

Hi @camputty,

I try to replicate the issue but I can’t able to do that. It’s working fine.