To ensure the centralization of user consent across your main domain, you must include the userCookiesDomain
property within the axeptioSettings
object in your configuration script. This ensures consistent and sustainable consent management, without requiring complex solutions.
<script>
window.axeptioSettings = {
clientId: "xxxxxxxxxxxxxxxxxxxxxxx",
cookiesVersion: "v1-moncookiesite",
userCookiesDomain: "moncookiesite.eu" };
(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>
In other words, you should:
Create a single project for your main domain
Customize the widget by listing all cookies used on your main domain and its subdomains
In your project script, add the line:
userCookiesDomain: "yourdomain.com"
Embed this script on your main domain site and across all of its subdomains
This setup ensures that cookie consent is respected across your entire domain and its subdomains.
As a result, the widget will no longer appear systematically if the visitor has already given their consent on a different subdomain than the one they are currently visiting. 😉