Add Dux active consent banner to polaris-react.shopify.com
#14007
+1,011
−475
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.
WHY are these changes introduced?
Google Analytics cookies (
_ga
,_ga_*
,_gid
) were being set immediately on page load without user consent on polaris.shopify.com, potentially violating GDPR and other privacy regulations in regions like the EU.WHAT is this pull request doing?
Implements consent-based Google Analytics tracking using Shopify Dux to ensure GDPR compliance for the Polaris documentation site.
@shopify/dux
(v4.4.0) for consent management with granular consent controls<ActiveConsent>
banner that appears in GDPR regionscountryCode="GB"
to force the consent banner to show everywhere for testing (could possibly be replaced with actual geo-detection from Cloudflare request headers to show only in GDPR countries)locale="en"
as the site content is only available in EnglishKey Changes:
hasConsentedAnalytics
andhasConsentedMarketing
for GA activationHow to 🎩
pnpm dev
in thepolaris.shopify.com
directory_ga
,_ga_*
,_gid
) are set only after consentImpact & Risks: