feat(audience): add web SDK with consent, page tracking, and attribution#2821
Closed
ImmutableJeffrey wants to merge 1 commit into
Closed
feat(audience): add web SDK with consent, page tracking, and attribution#2821ImmutableJeffrey wants to merge 1 commit into
ImmutableJeffrey wants to merge 1 commit into
Conversation
Implement @imtbl/audience-web-sdk importing types, config, and events from @imtbl/audience-core (contract-only). All runtime code is web-specific: - ImmutableWebSDK class: init, track, page, identify, alias, consent - ConsentManager: three-tier (none/anonymous/full), server sync, DNT/GPC - MessageQueue: localStorage persistence, unload flush (keepalive), stale filtering, consent-aware purge/transform - PageTracker: SPA route detection (pushState/replaceState/popstate) - Attribution: UTM params, click IDs, referrer, landing page - Transport: fetch with keepalive for page-unload resilience - Cookie: domain-aware, session (30min rolling), consent (1yr) - Validation: timestamp range, alias dedup, max-length truncation - CDN bundle: IIFE exposing window.ImmutableWebSDK Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This was referenced Apr 5, 2026
|
View your CI Pipeline Execution ↗ for commit 358f4ea
☁️ Nx Cloud last updated this comment at |
Contributor
Author
|
Closing — part of stacked PR set, pending architecture alignment. |
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.
Summary
init()factory,track(),page(),identify(),alias(),setConsent(),reset(),flush(),shutdown()keepalive: true, stale message filtering, consent-awarepurge()/transform()pushState/replaceState/popstatepatching with dedupwindow.ImmutableWebSDK,window.AudienceEvent,window.IdentityProviderAll types, config constants, and events imported from
@imtbl/audience-core. Web-specific runtime only:WebSDKConfigis the only locally-defined type.Test plan
pnpm buildpasses (npm + CDN bundles + type declarations)pnpm typecheckpasses🤖 Generated with Claude Code