Back to the help center

Integrations

Share consent between your domains

One choice for your subdomains and your other sites, and what works in which browser

Available on the Pro plan and above. See pricing for what each plan includes.

Linked domains let a visitor choose once and have that choice apply on your other domains, for example your shop and its app on a subdomain, or your .com and .de sites. Included in Pro and above.

Set it up

  1. Add every domain to GetCookies and install the banner on each of them.
  2. Open one of the domains in the dashboard and find Linked domains.
  3. Under Link another domain, choose a domain and click Link domain. Repeat for each domain.

You need edit access to both domains, and both need a plan that includes cross-domain consent. Domains linked through a shared domain form one group: if A is linked to B and B to C, all three share. A group has at most 50 domains.

Each link shows how it shares: Same site: shared instantly or Separate site: shared on link clicks.

The banner tells visitors where their choice applies

On every domain of a group, the banner message ends with a line, in the banner's language, that names the other domains and says how the choice reaches them:

  • *Your choice also applies to app.example.com.*
  • *Your choice also applies to example.de when you go there from a link on this site.*

The line is shown on the first layer and in the preferences view. It cannot be edited or turned off: a choice only covers another domain when the visitor was told so before choosing. A domain without linked domains shows no such line.

What works where

The result is the same in Chrome, Edge, Safari, Firefox and Brave:

SituationShared?
Domains on one site (example.com, www.example.com, shop.example.com), any visitYes
Separate sites (example.com, example.de), the visitor follows a link from one to the otherYes
Separate sites, the visitor types the address, or comes from a bookmark, a search result or an adNo: the visitor is asked again

GetCookies does not use third-party cookies or hidden frames for this. Safari, Firefox and Brave block or partition them, and Chrome lets visitors block them, so a choice shared that way would apply in some browsers and not in others.

Domains on one site are those under the same registrable domain, as listed in the Public Suffix List: shop.example.com and www.example.com are one site, a.github.io and b.github.io are two.

After every choice, the banner asks the GetCookies API to sign it and stores the result in a cookie, getcookies_xd_consent, on the site itself (for shop.example.com that is example.com), so every subdomain can read it, also when the visitor types the address. It is your own first-party cookie, SameSite=Lax, and Secure on https pages. It holds the categories, the kind of choice, when it was made and on which domain, and no visitor ID. The receiving banner hands it to the API, which checks the signature before anything is applied: the page holds no key, so a cookie written by anyone else is ignored.

Safari keeps cookies set by a page's scripts for at most 7 days. When it has removed this one, the next page view on a domain of the site that has the choice writes it again.

When a visitor clicks a link to another domain of the group (also with the middle button, or with Enter), the banner adds a token to that link as a gc_xd parameter at that moment, and puts the original link back right after, so the token is never copied, shared or bookmarked with the page. The token is signed by the GetCookies API and expires after 10 minutes.

On the other domain, the loader takes gc_xd off the address bar before your other scripts run, and the API verifies the token. The choice is applied only when:

  • the visit comes from a domain of the group. The browser tells the banner where the visitor came from (the referrer); for these links the banner sends only the origin, never the full address, also on links marked noreferrer;
  • the token is signed by GetCookies, has not expired and was not used by another visitor before;
  • the choice is newer than any choice the visitor already made on that domain.

An address with a token that was pasted, shared or opened from somewhere else is ignored, and the token is removed from it.

Links opened from the browser's context menu (Open link in new tab, Copy link) carry no choice, and the visitor is asked again.

For navigation the banner cannot see, such as a redirect after sign-in, pass the address through the JavaScript API:

javascript
window.location.href = window.GetCookies.crossDomainUrl('https://example.de/welcome');

crossDomainUrl returns other addresses unchanged, and also returns this one unchanged while the choice has not been signed yet. These navigations follow your page's referrer policy: with Referrer-Policy: no-referrer the other domain cannot tell where the visitor came from and asks again.

A direct visit to a separate site asks again

Browsers keep each site's storage apart, so when a visitor opens a separate site directly, nothing tells the banner there what they chose on your other site. The banner asks, in every browser. The choice made there is then shared onwards in the same way.

Newest choice wins, including withdrawals

Every shared choice carries the time it was made. A domain takes it over only when it is newer than its own, so a visitor who rejects cookies on one domain after accepting on another has the rejection applied as well: on the next page view on the same site, and on the next link click to a separate site.

The choice taken over expires when the receiving domain's consent duration runs out, counted from when the visitor made it, not from when it arrived. Only categories the receiving domain uses are granted, and necessary always applies, so use the same cookie categories on every domain of a group.

A visitor can always change or withdraw their choice on any domain with the privacy settings link or icon.

Each domain keeps its own consent records. When a domain takes over a choice, it stores a record for it that names the domain the choice was made on, when it was made, and whether it came by a link or by the shared cookie. The consent log shows it as Inherited from that domain. The record counts towards the receiving domain's monthly consent records; over the allowance, the choice is applied but not stored, as for any banner choice.

Content Security Policy

The banner loads the cross-domain code (cross-domain.min.js) from the same GetCookies address as the banner, and calls the same API. The script-src and connect-src entries from Content Security Policy (CSP) errors already cover it.

When the banner still asks

  • The domains are not in one group, the link is switched off, or one of the domains is on a plan without cross-domain consent.
  • The visitor opened a separate site directly.
  • The link was opened from the context menu or copied, or the referrer was removed, for example by a browser extension.
  • The visitor clicked the link in the same moment as making the choice, before it was signed.
  • The choice has expired on the domain where it was made.

Still stuck?

Email [email protected] with your domain and what you tried. Signed-in customers can also open a ticket from the dashboard.