Skip to content

Commit 70cccb1

Browse files
feat(audience): add ImmutableWebSDK with consent, tracking, and identity
ImmutableWebSDK.init() provides consent-aware event tracking for web: - track(), page(), identify(), alias() with three-tier consent gating - Uses core's createConsentManager (shared with pixel), collectAttribution, and getOrCreateSession — no duplicated logic - session_start/session_end lifecycle with duration tracking - Attribution capture (UTM, click IDs, referrer) on first page view - setConsent() with queue cleanup on downgrade, session restart on upgrade - reset() for player logout, flush() for manual send, shutdown() for cleanup 46 tests covering all public methods, consent transitions, and edge cases. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 549a098 commit 70cccb1

4 files changed

Lines changed: 1179 additions & 127 deletions

File tree

packages/audience/sdk/src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
export type { AudienceSDKConfig } from './types';
2-
export { DebugLogger } from './debug';
3-
export { collectContext } from './context';
1+
export { ImmutableWebSDK } from './sdk';
2+
export type { WebSDKConfig } from './types';
3+
export type { Environment, ConsentLevel, UserTraits } from '@imtbl/audience-core';

0 commit comments

Comments
 (0)