#A cookie-wall with Didomi

#What is Didomi?

Didomi builds technologies that allow organizations to place customer consent at the core of their strategy. By making consent and preferences easily accessible, companies benefit from compliant customer data while seeing higher engagement and increased user trust.

#What is a cookie-wall?

Tightened privacy restrictions in France have led to consent rates falling by 70-90%, significantly damaging revenue streams, weakening analytics and complicating marketing for publishers. With this phenomenon gradually spreading across Europe and beyond, we created a new type of wall called a cookie-wall, allowing you to ask again for consent for visitors that declined cookies, or give them an alternative.

#Enable the cookie-wall

First thing first, the activation of this feature should be requested to our Customer Success team. Also, you should add Poool as vendor in your Vendors & Purposes list in your Didomi console.
Enable the cookie-wall feature by going to your dashboard, Access > Scenarios, select the context you want the cookie-wall to appear in (or the default context) and click on the Privacy menu item.
To activate the cookie-wall, select "Explicitly ask user for consent". Conversely, to deactivate it, select "Do not explicitly ask for user consent".
Then, you will be able to fully customize your cookie-wall by selecting the alternative, the appearance etc. Just like you can do with a widget in a scenario.

#Setup the code part

Now that our cookie-wall is expected to show up, we can add the necessary code to re-ask for consent, using Didomi (assuming Didomi is installed on your site), when a click on I consent occurs:
In this example, the onConsent event handler will be fired when the visitor clicks on I consent, the Didomi notice will show up, and the promise inside the handler will resolve or reject depending on the visitor interaction with the Didomi modal.

ℹ️ Not all the available Didomi events are used in this example, please see the Didomi documentation for additional events.

Once the promise has been resolved or rejected (reject() is the same as resolve(false) here), the cookie-wall will either unlock content or don't do anything at all.

Alternatively, if don't want to use the cookie-wall anymore and want to show a particular widget when the visitor has refused to give consent, you can change the default widget using consent_rejection_widget: