Forum Academy Marketplace Showcase Pricing Features

Permanent dismiss of alert

Hi guys, I am working on my cookie popup disclaimer.

I assume I should make it popup display on every page throughout the website until user has clicked the accept button. Would I be correct in thinking the best way to do this is to create a Yes/No field in the User database so that when they click ‘Accept’ I can register the user as ‘Yes’, then only show the popup for Users who are ‘No’.

Is that a sensible way to deal with permanent dismissal of cookie popup display?

Yes exactly. A field for the User would work.

You can also use a Cookie plugin from the plugin store. Kind of basic and you can’t really customize it.

Tal
Learn no code → nocodify.com

Thank you for confirming this is a good solution.

I have set it up so that when a user clicks ‘accept’, the database is updated and the cookie notice is permanently hidden.

But, there some annoying behaviour.

Because a user must be logged in to dismiss the cookie notice, when they log out, they immediately see the cookie notice again, even thought they’ve accepted it. Similarly, when you first come to the site and are not logged in, you see the cookie notice, but then as soon as you join and sign in, you see it again which all feel a bit aggressive.

I realise this is because the user must be logged in to permanently delete it, but is there a way to tell the users browser not to show the alert again if it’s been accepted, even after logout? How do other sites manage this issue?

Capture the users IP and build in conditions to not show it if the IP captured and user accepted.

Thank you for the tip. For the benefit of others, here is how to capture the users IP.

I actually woke up in the middle of the night with a ridiculously simple solution, almost embarrassed to say it because it’s so simple!

Logout action logs the user out and goes to a page which doesn’t display the cookie popup so that solves it!

Still, when you first come to the site and are not logged in, you see the cookie notice and have to re-click it once logged in for the first time, but I will live with that for now.