Search
Close this search box.

Documentation

In this article

Categories

Recent articles

Cross-domain cookie consent

This guide will help you enable cross-domain cookie consent, allowing users to store their consent settings across different domains or subfolders. Users will only need to consent once, simplifying the consent process.

What is cross-domain cookie consent?

Cross-domain cookie consent allows storing a user’s consent settings across various domains or subfolders. This means a user who consents on one domain (e.g., domain A) will have their settings automatically applied to other domains (e.g., domain B), only needing to show the consent banner once.

Example:

  • Subfolder: domain.com/subfolder
  • Subdomain: subdomain.domain.com

Important Note:

Most privacy laws prohibit cross-domain consent because it’s unlikely that different domains (Domain A and Domain B) have identical configurations of functional/non-functional cookies, processors, and service providers.

However, this feature was prompted by the fact that we have seen multisite users with identical setups across multiple subdomains/subfolders.

Enabling cross-domain cookie consent

For Subdomains

You can enable cross-domain cookie consent for subdomains. For example, if you want to share consent between www.yoursite.com and academy.yoursite.com, follow these steps:

  1. Navigate to Complianz → Settings → General
  2. Enable the “Set cookiebanner cookies on root domain” feature
  3. Set the “Domain to set the cookies on” to your root domain (e.g., www.yoursite.com).
  4. Repeat these steps for each site where you want this to apply

 

For Domains and Subfolders

This method is available in the Premium (Paid) versions

To enable cross-domain cookie consent for a domain and its subfolders, add the following line to your functions.php, child functions.php, or as a mu-plugin in all WordPress installations:

update_option('complianz_active_policy_id', 20);

This sets the policy ID for your domain and subfolders.

Important Considerations:

  • When Complianz recognizes a significant change in your cookie policy, the policy ID will change, and consent will reset for previous users.
  • To manually reset consent, raise the policy ID by updating the code above.

Join 900.000 users and install The Privacy Suite for WordPress locally, automated or fully customized, and access our awesome support if you need any help!

Complianz has received its Google CMP Certification to conform to requirements for publishers using Google advertising products.