Cookie Consent Div Shows After Cookie Loaded

Hey All,

I’ve implemented the Cookie consent as per the guidelines here:

Everything works great, except:

In the cookie notification (https://www.brahmanhills.co.za/) I have a link that takes the user to a new page with the full policy, should they wish to read it. On this new page I have another button that allows the user to accept cookies. This button has the same element ID as the button on the homepage (it’s the only button with this ID on the page), so it should set the cookie correctly. It also has a javascript:window.history.go(-1) link to take the user back to whatever page the cookie notification appeared on. All good up to this point.

The problem is that arriving back to the homepage or whatever page javascript:window.history.go(-1) takes you back to, displays the cookie notification again.

Does anyone have an idea about why this would happen and any fix?

Project is here: https://preview.webflow.com/preview/brahmanhills?utm_source=brahmanhills&preview=f0cc5aee81c09eb812320267990ad990