Skip to content

feat(audience): add DNT/GPC detection utility to web SDK#2828

Closed
ImmutableJeffrey wants to merge 5 commits intofeat/audience-4-attribution-cdnfrom
feat/audience-web-sdk-dnt-gpc
Closed

feat(audience): add DNT/GPC detection utility to web SDK#2828
ImmutableJeffrey wants to merge 5 commits intofeat/audience-4-attribution-cdnfrom
feat/audience-web-sdk-dnt-gpc

Conversation

@ImmutableJeffrey
Copy link
Copy Markdown
Contributor

Summary

Adds detectPrivacySignal() as an exported utility that studios can call before setting consent. Not wired into ConsentManager — studios decide how to handle the signal in their CMP.

Deferred from v1. Preserved here for v2.

Stacked on: #2827

🤖 Generated with Claude Code

ImmutableJeffrey and others added 5 commits April 7, 2026 12:19
Bug fixes:
- Fix generateId fallback to UUID v4 format (backend requires UUID)
- Replace sendBeacon with fetch+keepalive (sendBeacon can't set auth header)
- Cap batch size at 100 messages per flush (backend maxItems limit)

New capabilities:
- Export getCookie/setCookie/deleteCookie; add domain param for cross-subdomain
- collectContext() now accepts optional library/version params (backward compatible)
- Add queue.purge(), transform(), flushUnload(), onFlush, staleFilter
- Add storage prefix param for per-surface localStorage isolation
- Add transport keepalive option
- Add ConsentLevel, ConsentStatus, SESSION_COOKIE shared types
- Add validation module (isTimestampValid, isAliasValid, truncate)
- Add packages/audience/sdk to pnpm workspace

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…kies

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…n lifecycle

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds detectPrivacySignal() as an exported utility that studios can call
before setting consent. Not wired into ConsentManager — studios decide
how to handle the signal in their CMP.

Deferred from v1. Preserved here for v2.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@nx-cloud
Copy link
Copy Markdown

nx-cloud bot commented Apr 7, 2026

View your CI Pipeline Execution ↗ for commit 780a5eb

Command Status Duration Result
nx run-many -p @imtbl/sdk,@imtbl/checkout-widge... ✅ Succeeded 2s View ↗
nx affected -t build,lint,test ✅ Succeeded 8s View ↗

☁️ Nx Cloud last updated this comment at 2026-04-07 02:59:46 UTC

@ImmutableJeffrey ImmutableJeffrey force-pushed the feat/audience-4-attribution-cdn branch 4 times, most recently from d66a682 to 23ed51b Compare April 7, 2026 06:51
@ImmutableJeffrey
Copy link
Copy Markdown
Contributor Author

DNT/GPC detection is already in core via detectDoNotTrack() from the pixel-core-consent branch. No additional work needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant