Registering User choices

How the registration of users choices on cookies works on your site

When the cookie management widget closes, Axeptio will itself write a "technical" cookie.

This technical cookie is a JSON object (a data structure readable by explorers) that contains the vendors list. You can decode it in Javascript by using the JSON.parse function. It is composed of properties reusing the vendors names that you have configured in the Axeptio backoffice. So, if you checked Google Analytics, you will find in this object a property google_analytics , that will be defined as true or false, depending if the user agreed or not with the trigger of this vendor.

The object contains the token aswell, used to register consent and the date at which it was given.

By default, it is attached to current domain, and not secured. This means that if the consent collection is done on www.monsite.com, the user choices will not affect app.monsite.com.

If you want to allow the consent collection to all sub-domains, you will have to modify the script used to load Axeptio.

Here is an example of code used to load our widget

<script>
window.axeptioSettings = {
  clientId: "5c11ff5ce95cd64112feab79",
};
 
(function(d, s) {
  var t = d.getElementsByTagName(s)[0], e = d.createElement(s);
  e.async = true; e.src = "//static.axept.io/sdk.js";
  t.parentNode.insertBefore(e, t);
})(document, "script");
</script>

To declare the domain where you want your user preferences cookie, you will juste have to add a new property to the object axeptioSettings :

window.axeptioSettings = {
  clientId: "5c11ff5ce95cd64112feab79",
  userCookiesDomain: "axeptio.eu" // added line
};

Once the code changed, the cookie registered in the explorer will be available for all sub-domains of axeptio.eu, for example : mail.axeptio.eu or admin.axeptio.eu

Last updated