Skip to documentation content

Cross-domain consent

Share a visitor's choice across your subdomains, and what the Cross-Domain Consent Sync switch does and does not do today.

A visitor's choice is stored in a first-party consent cookie (cb_cookie by default). Browsers only send a cookie to the site that set it. So by default, a choice made on www.example.com is not visible on shop.example.com, and never visible on example.org.

There are two different cases:

CaseExampleHow
Subdomains of one domainwww.example.com and shop.example.comSet the consent cookie's domain. Works on every plan.
Separate domainsexample.com and example.orgSee Separate domains below.
  1. Open the banner and choose Banner settings.
  2. In the Consent section, find Consent cookie.
  3. In Domain, enter your registrable domain, for example example.com. Leave it empty (Automatic) to keep the cookie on the current host only.
  4. Save the settings, then Publish the banner.
  5. Make sure every subdomain loads the same banner, and that each subdomain is listed in the banner's authorized domains (Banner domains).

The runtime then writes the consent cookie with that domain, and the browser sends it to every subdomain. A choice made on one subdomain applies on the others.

Things to check:

  • Use the same banner on every subdomain. Then every subdomain reads the same consent cookie against the same categories.
  • The domain must match the site. A browser ignores a cookie set for a domain the page is not part of. If the cookie does not appear on a subdomain, check the spelling of the domain.
  • Earlier choices stay on their original host. A visitor who chose before the change has a cookie on that host only. Other subdomains do not see that earlier choice.

Separate domains

The Cross-Domain Consent Sync switch is in Banner domains. It appears when the banner has two or more domains, and it is included in the Business plan and above. Its description reads "When a user accepts on one domain, they are recognized on all other domains under this banner."

Be aware of what it does today. Turning it on enables a CookieBeam sync service for that banner. That service stores a visitor's consent state against a consent token, and accepts requests only from the banner's authorized domains. The published banner script does not yet read from or write to this service. Turning the switch on does not, by itself, carry a choice from example.com to example.org.

Until the banner script uses the sync service, a visitor who moves between two separate domains is asked on each one. Plan your consent flow on that basis.

Verify

  1. Open the first site in a private window and make a choice.
  2. In the browser's developer tools, open the cookies for the site and find the consent cookie. Check its Domain value.
  3. Open a second subdomain in the same window. The banner should not ask again, and the consent cookie should be the same one.

If the banner asks again, check that the second subdomain loads the same banner, that the published bundle includes the new cookie setting, and that the cookie's domain covers both hosts.