a-digital / cookie-consent-banner

Add a configurable cookie consent banner to the website.
MIT License
11 stars 14 forks source link

How to show banner again? #33

Closed felixfischer closed 3 years ago

felixfischer commented 3 years ago

We need to be able to give users the choice to revoke their consent. How can we show the banner again after the user made their decision?

On the first page, where the user makes their decision, there remains a small tab at the bottom with which you can re-enable the popup. But when you navigate to another page the tab is no longer there, and there's also no global cookieconsent variable anymore.

mark-adigital commented 3 years ago

The banner will reappear when the cookie called cookieconsent_status expires, so an easy way to force the banner to be redisplayed would be to clear it through JS for anyone who hasn't made a recent choice. You can also use the 'Expiry Days' field to set how long the preference should be stored for.

felixfischer commented 3 years ago

Thanks, @mark-adigital! Much appreciated!