All Collections
Cookie Wall with Alternative
How can I set up a Cookie Wall with Alternative using Didomi's native connector?
How can I set up a Cookie Wall with Alternative using Didomi's native connector?

Discover the steps needed to implement a Cookie Wall with Alternative, using Didomi's native connector

Flore Bayle avatar
Written by Flore Bayle
Updated over a week ago

Now that you're an expert in Cookie Wall's with Alternative (not quite yet? Have a read of our article ๐Ÿ‘‰ What is a cookie wall with alternative?), let's get to the heart of the matter: the implementation.

Thanks to our strategic partnership with Didomi, you can enjoy this "plug & play" feature. Here are the main steps for activation:

Didomi CMP settings

Before all else, you need to add Poool into the Didomi CMP.

To do this, add Poool as a custom vendor to your consent notice.

  • Go to your consent notice in the Didomi console and click on the third step "VENDORS&PURPOSES".

  • Add the vendor "Poool" to your notice.

Define the action in your Dashboard

Once this plug is set up, you can configure the Cookie Wall with Alternative in your Poool Dashboard.

Setting the Cookie Wall up is done within a context., where you can choose the content on which you'd like to present users with a Cookie Wall.

Head into the scenario tab and, on your selected context, click on the options on the right, then choose [Consent].

You can then choose the option "Explicitly ask users for consent", and add your configuration.

Widget configuration

You can then choose to set up other elements of the wall:

  • The alternative action: you can choose between several options, including Free Article, Invisible Unlock, Commercial, Subscription, Form or None

  • The appearance of your widget

  • In the advanced configuration section, you can define and activate the connexion link

  • In the tab 'Advanced texts settings' you can define the text used on the wall

๐Ÿ’ก If you'd like to encourage newsletter inscription, you can use 'Form' as an alternative to cookies. This allows you to collect valuable data points! But note, this data is collected in your own system as Poool doesn't store any data in order to remain GDPR compliant. We advise that you check with your DPO that the alternative proposed is in line with your internal privacy policy.

๐Ÿ’ก If you don't want to set up an alternative option on the wall, you need to create a scenario "all users" and use the "invisible unlock" action.

Technical implementation

Putting the integration in place is very simple - you simply have to add the following code to your Poool config.
โ€‹

๐Ÿ“Œ Script poool - previous version

Add between the lines "init" and ("send", "page-view") :

poool('event', 'onConsent', function() {
var didomi_purposes_array = ['_s', 'select_basic_ads', 'create_ads_profile', 'select_personalized_ads', 'create_content_profile', 'select_personalized_content', 'measure_ad_performance', 'measure_content_performance', 'market_research', 'improve_products', 'geolocation_data', 'device_characteristics'];

return new Promise((resolve, reject) => {
window.Didomi.on('notice.clickagree', function () {
resolve(true);
});
window.Didomi.on('notice.disagree', function () {
reject(false);
});
window.Didomi.on('notice.clickdisagree', function () {
reject(false);
});
window.Didomi.on('preferences.clickagreetoall', function () {
resolve(true);
});
window.Didomi.on('preferences.clickdisagreetoall', function () {
reject(false);
});
window.Didomi.on('preferences.clicksavechoices', function(){
var purposes_array = window.Didomi.getRequiredPurposeIds();
var user_status = window.Didomi.getUserStatus();
var purposes_filtered = purposes_array.filter(function(e) { return this.indexOf(e) >= 0;}, didomi_purposes_array);
var user_status_filtered = user_status.purposes.consent.enabled.filter(function(e) { return this.indexOf(e) >= 0;}, didomi_purposes_array);

if(purposes_filtered.length === user_status_filtered.length){
resolve(true);
} else {
reject(false);
};
});
window.Didomi.notice.show();
});
});

๐Ÿ“Œ Poool script - new version

Add to your Access configuration:

access.on('consent', () => {
const purposes = [
'_s', 'select_basic_ads', 'create_ads_profile', 'select_personalized_ads',
'create_content_profile', 'select_personalized_content',
'measure_ad_performance', 'measure_content_performance', 'market_research',
'improve_products', 'geolocation_data', 'device_characteristics',
];
return new Promise((resolve, reject) => {
Didomi.on('notice.clickagree', () => {
resolve();
});
Didomi.on('notice.disagree', () => {
resolve(false);
});
Didomi.on('notice.clickdisagree', () => {
resolve(false);
});
Didomi.on('preferences.clickagreetoall', () => {
resolve();
});
Didomi.on('preferences.clickdisagreetoall', () => {
resolve(false);
});
Didomi.on('preferences.clicksavechoices', () => {
const neededPurposes = Didomi.getRequiredPurposeIds()
.filter(p => purposes.includes(p));
const userPurposes = Didomi.getUserStatus()
.purposes.consent.enabled
.filter(p => purposes.includes(p));
resolve(neededPurposes.length === userPurposes.length);
});
Didomi.notice.show();
});
});

For more information, you can find our dedicated Didomi integration guide just here.

And that's it! Your Cookie Wall will be displayed on your website ๐Ÿ™‚

Did this answer your question?