How to insert code for disabling cookies with Cookie Consent by Asano?

Hi there!

The EU ruled that German websites also have to use an opt-in cookie banner. Until now I used Cookie Consent by Asano with informational cookie banners.

But if I want to use an opt-in cookie banner, there is additional code to disable cookies:

Three questions:

  1. Can I use the code without modification or what I would need to modify?
  2. Where I have to insert the code? Head? Body? As embedded Code element?
  3. What is a “callback hook” and how do I insert this?

So sorry. I am just a designer with basic code knowledge. And this simple issue is a complex challenge for me. :see_no_evil

Many many thanks for your help!

1 Like

Hi,
You can put this in the body in your project settings, instead of inside each page’s code.

Hi! Many thanks for your reply! So simply put that code in the body custom code section of the project settings without modifying? And what is with this “Callback hook”?

Awesome! Take care, see ya :slight_smile:

?? You did not answer to my question… How do you mean that?

Oh haha :slight_smile: sorry, I was preoccupied with the pregame talk. So yes you put it inside the project settings custom code section, in the body. A callback hook is basically an action that takes place when the user takes apecific action.

What it’s saying is “what do you want to happen”? The callback hook options are listed below the title:

  1. On pop up
  2. On pop up close
  3. On initialize
  4. On status change
  5. On revoke choice

These are the options the script has built in. You get to choose which one to use.

But…

If I may add - you don’t really need this type of a script when using Webflow. This is more for sites that manage their own server and store data (sensitive or not). Sites that users will be interacting with and providing data - that the company will use for various purposes. On Webfow you won’t be doing this with user data. So the cookie notification is perfectly fine in this case. GDPR is compliant if you tell the user first.