Delegate async consent initialization to consent-tracking-api - #3963
Open
frandiox wants to merge 4 commits into
Open
Delegate async consent initialization to consent-tracking-api#3963frandiox wants to merge 4 commits into
frandiox wants to merge 4 commits into
Conversation
Let consent-tracking-api own initial consent readiness and visitor-state loading so Hydrogen no longer duplicates request and event orchestration. Install analytics listeners before the async consent script, preserve cart and deprecated-cookie refreshes across readiness and interaction events, and retain the existing asynchronous visitor-state behavior. Co-authored-by: Codex <codex@openai.com>
Use consent-tracking-api's canonical GDPR banner decision so Hydrogen does not duplicate consent-state semantics. Co-authored-by: Codex <codex@openai.com>
frandiox
force-pushed
the
fd-consent-integration
branch
from
August 21, 2026 08:32
344c087 to
bf93e17
Compare
The consent-tracking API and privacy banner releases are now available from their canonical CDN URLs, so the temporary checked-in bundles and local paths are no longer needed. This reverts commit bf93e17. Co-authored-by: Codex <codex@openai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #3960.
TL;DR: Delegate initial asynchronous consent loading to consent-tracking-api instead of maintaining a second orchestration path in Hydrogen.
Before
Hydrogen injected a consent bootstrap that called
setTrackingConsent, tracked readiness, and annotated consent events. This duplicated behavior that now belongs to consent-tracking-api.After
Hydrogen enables asynchronous consent and visitor state in the Shopify global config. The analytics bus installs its listeners before the async consent library, treats
consentTrackingApiLoadedas initial readiness, and treatsvisitorConsentCollectedas a shopper interaction.What this changes
asyncVisitorState.Developer impact
No public Hydrogen API is added. No changeset is included because this PR refines the unreleased
ShopifyScriptsbehavior introduced by the stacked base branch.Risk