To ensure a smooth experience for your users across all your sites, you can configure consent sharing between your main domain and its subdomains. This allows you to avoid displaying the consent banner each time users switch subdomains.
Once the user makes their choice on mysite.fr, it is automatically recognized on app.mysite.fr, blog.mysite.fr, etc. No need to ask for their consent again: the experience is smoother, and engagement rates improve.
👉 In this article, we will use a main domain mysite.fr as an example, with two subdomains: app.mysite.fr and blog.mysite.fr.
Prerequisites
Create a single Axeptio project. You will need to load this same project on all your sites.
In your banner, add all the services used on your main domain and subdomains.
Integrate Axeptio on all affected sites, making sure to load the same project.
Set the userCookiesDomain parameter
If you integrated Axeptio via Google Tag Manager
Make sure you have properly installed our Axeptio CMP tag template by following our guide.
Open your Axeptio CMP tag (its name may be different if you renamed it).
In the panel that appears, click inside the Tag configuration block to edit it.
At the bottom of the block, expand the Cookie settings section.
In the User cookies domain field, enter your main domain without a prefix (no
http://,https://, orwww). In our example, entermysite.frClick the Save button in the top right.
Back in Tags, click the Submit button in the top right to make your changes effective.
If you integrated Axeptio via your CMS
Go to the plugin/module configuration interface in your CMS. Locate the field where you can enter your main domain, usually titled User cookies domain.
Enter your main domain without a prefix (no
http://,https://, orwww). In our example, entermysite.fr
If you integrated Axeptio manually
In the Axeptio initialization script, add the userCookiesDomain property to the axeptioSettings object:
<script>
window.axeptioSettings = {
clientId: "xxxxxxxxxxxxxxxxxxxxxxx",
cookiesVersion: "ma-config-fr",
userCookiesDomain: "mysite.fr" // Replace here with your main domain (without http, https, or www) to share consent across all your subdomains
};
(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>
