The consent bar is observed by the cookie-consent.js
script and shown until the user clicks the opt-in button. It is possible to set up multiple buttons to trigger different consent levels (allow necessary cookies only, allow experience cookies, allow all cookies etc.).
Warning: The example below is configured to consent due to continued usage. This is not valid anymore in the EU, take a look at the README to learn how to set up correct consent levels.
The example tracker.js
script will output different messages to the console depending on the stored consent level.
The cookie consent repository is available at GitLab & GitHub (Mirror).
Demo page made with html5example.com.