Check all buttons in my cookie list by default

Loïc
Loïc
  • Updated

Do you want to have all the cookies already selected in the widget when the visitor clicks on "I choose"? 

Here's how to do it: 

Find the technical names of your cookies. You can find a guide here .

Add this code to the Axeptio script:

 

window.axeptioDefaultChoices = { 
  //Replace this text with the name of your cookies, e.g. :
  facebook_pixel: true,
  at_internet: true,
}
For the settings of Consent Mode v2, which you can find in the screen dedicated to Consent Mode v2 of your widget, the nomenclature is a bit different : 
window.axeptioDefaultChoices = { 
$$googleConsentMode: {
analytics_storage: "granted",
ad_storage: "granted",
ad_user_data: "granted",
ad_personalization: "granted",
},
}

 

You can of course combine the two to cover all the steps of your widget : 

Example : 

window.axeptioDefaultChoices = {
criteo: true,
kwanko: true,
facebook_pixel: true,
pinterest: true,
traackr: true,
hubspot: true,
$$googleConsentMode: {
analytics_storage: "granted",
ad_storage: "granted",
ad_user_data: "granted",
ad_personalization: "granted",
},
};

Was this article helpful?

2 out of 13 found this helpful