Overview
Simple Cookie Banner

⚠️ Work in progress ⚠️

Attention: This script showcased on this page is not finished! It might not work as intended under certain conditions, on certain browsers or on certain devices. The JavaScript filed linked in the code section below is still subject to change and could break pages which used the older file. If you would like to report errors or make suggestions for new features you can do this here.

false

Simple Cookie Banner

This script is one of the simplest and fastest ways to get a cookie banner on your page which disappears once you've dismissed it – and it's all done right within webflow. You can also use this function to make all kinds of different banners which should only appear on the first page load. Attention: This banner is not GDPR compliant.

Demo

This Website uses Cookies. Learn more.

Ok

Documentation

Setup

To setup the script you need to set the following attributes on your finished cookie banner:

Name
Value
Description
cb-cookies-element
container
The element which contains the whole cookie bar. This element gets removed by the script if cookies have already been accepted and shown if they have not. For the best results this element should be hidden by default.
cb-cookies-element
accept
This Attribute marks the button the user has to click on to hide away the banner and accept the cookies.

Code

Attention: This code is linked to external files which might change or become unavailable in the future!

To make the code below easier and faster to implement it relies on files which are hosted externally on our servers. Because of that we cannot give you a 100% guarantee, that these files will always stay the same, or will always be accessible through the link provided. For better reliability we therefor advice you to host these files by yourself or add its content directly in Webflow. You can learn more about this topic here.
https://eseassets.ch/globalscripts/code/code.js
Download File

Add this code inside the <head> tag on your page.

Copy code
The code in here is only visible on the published website.
Go to codeblocks.webflow.io or take the code from the actual custom code field of this page

Add this code before the </body> tag on your page.

Copy code
The code in here is only visible on the published website.
Go to codeblocks.webflow.io or take the code from the actual custom code field of this page
We won't take any responsibility for the code provided. It may not be set up according to best practices of programming or built in the most efficient way possible. It's just here so solve your problem.

Get the source code for
free by signing up to Codeblocks