You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(core): TRAC-813 Gate analytics cookies behind shopper consent
When the store's cookie consent setting is enabled, the catalyst.visitorId
and catalyst.visitId analytics cookies are no longer set or refreshed until
the shopper grants measurement consent, and leftover cookies are deleted
once consent is withdrawn. The currencyCode preference cookie now requires
functionality consent. With no consent decision recorded yet, cookies are
only allowed when the store does not require cookie consent.
The proxy only starts visits on full page navigations, so granting consent
mid-session now triggers a startVisit server action that sets the cookies
and fires the server-side visitStartedEvent immediately. Server action
POSTs no longer start visits in the proxy, which would otherwise duplicate
the event fired by the action.
Fixes TRAC-813
Co-Authored-By: Claude <noreply@anthropic.com>
Gate Catalyst cookies behind shopper consent when the store's cookie consent setting is enabled. The `catalyst.visitorId` and `catalyst.visitId` analytics cookies are no longer set (and are removed if previously set) until the shopper grants measurement consent, and the `currencyCode` preference cookie requires functionality consent. When measurement consent is granted mid-session, a new `startVisit` server action immediately starts the visit and fires the server-side `visitStartedEvent`. Stores with cookie consent disabled are unaffected.
0 commit comments