Cookie consent across Magento 2 domains: when does a choice reach the second store?

3 min read

Two silver storefront windows with separate cookie symbols and toggles in violet and turquoise

A customer accepts cookies in one store, changes language, and sees the banner again. Is that a fault? Compare the addresses first: a shared Magento Admin or the same GTM container does not imply shared preference storage in the browser.

Separate the store view from the host

Language views on one host but different paths can read the same stored choice. A subdomain is a different host. A separate registrable domain cannot receive that choice merely by widening a cookie’s scope. MDN’s cookie documentation explains the Domain attribute.

Do not automatically assign a new consent choice to every Store View switch. Establish whether the host, path, or only content changed. Technical sharing of a stored value also does not establish whether the information and choice scope suit both stores.

Check what the module actually stores

In the reviewed Kowal Cookie Consent 1.1.5 code, the library uses cookie_consent_user_accepted and cookie_consent_level, among others. The module’s frontend configuration does not set cookie_domain; storage defaults to the current host, with path / and SameSite=Strict. This is not a cross-domain synchronization service.

In browser developer tools, open Application → Cookies and record the name, domain, path, and expiry of both entries on each site. Check for cookies with the same name at both host and parent-domain scope. A name’s presence alone does not prove that the correct value was read.

Map navigation between addresses

For each store pair, record the source and destination addresses, Store View, and intended choice scope. The following expectations concern the module’s default storage, without an additional sharing mechanism.

NavigationWhat to inspectStarting expectation
Different language, same hostCookie names and shared pathThe stored choice may remain available to both views
Second subdomainHost scope and any Domain attributeDefault host storage does not transfer automatically
Different registrable domainIts own storage and initial signalsSeparate state; Domain alone cannot join the domains

In an isolated probe of the bundled library, a language-path change retained the choice, while a second local subdomain started without it. This was not a production-store test. In your environment, separately repeat a fresh visit, acceptance, and refusal at the source, then navigate to the destination. Do not clear browser data between source and destination.

Verify Google signals on the destination page

An absent banner does not confirm tag state. Check defaults before a decision, the update after a choice, and state after reloading. Use Tag Assistant’s Consent Mode checks. The same GTM identifier on two domains does not transfer customer preferences by itself.

In the reviewed initializer, Google’s granted-state update is tied to loading the targeting level. Therefore, separately test a mixed choice and withdrawal of an earlier acceptance. Cookie storage and tag response are two outcomes to verify. Do not turn a refusal into acceptance to hide a measurement problem.

Record the outcome for each store pair

Source and destination; store views; decision scenario; cookies before and after navigation; Google signal state; result after reload; correction owner and due date.

Kowal Cookie Consent provides a banner and preference mechanism. The earlier guide covers the basic choice flow. If you need sharing between hosts, treat it as a separate integration project with an agreed scope and withdrawal test, rather than assuming a language switch performs it.

After verifying consent handling, also check contact events. WhatsApp click measurement explains why a click, a message, and a sale require separate interpretation. For each domain, record the consent state under which you collect the result.

Previous Next

KOWAL.BLOG

Choose your language

Available versions open the corresponding page. More languages are being prepared.

English (UK) Français Deutsch Español Italiano Português Nederlands Svenska Dansk Norsk Suomi Lietuvių Latviešu Eesti Čeština Slovenčina Magyar Română Български Ελληνικά Slovenščina Hrvatski Polski English (US)