Skip to content

feat(audience): add CDN bundle, demo page, and README#2827

Draft
ImmutableJeffrey wants to merge 3 commits intomainfrom
feat/audience-4-attribution-cdn
Draft

feat(audience): add CDN bundle, demo page, and README#2827
ImmutableJeffrey wants to merge 3 commits intomainfrom
feat/audience-4-attribution-cdn

Conversation

@ImmutableJeffrey
Copy link
Copy Markdown
Contributor

@ImmutableJeffrey ImmutableJeffrey commented Apr 5, 2026

Summary

Adds CDN distribution, demo page, and documentation.

Stacked on: #2826 (SDK class + attribution)

  • CDN bundle: Self-contained IIFE via tsup.cdn.js, assigns window.ImmutableWebSDK
  • Demo page: Interactive testing page with all SDK methods, dark/light theme
  • README: Install, quick start, API reference, consent, cookies, CDN usage

Test plan

🤖 Generated with Claude Code

@ImmutableJeffrey ImmutableJeffrey force-pushed the feat/audience-3-sdk-class branch from 68de603 to d72536d Compare April 5, 2026 23:26
@ImmutableJeffrey ImmutableJeffrey force-pushed the feat/audience-4-attribution-cdn branch from 50d982f to 15797da Compare April 5, 2026 23:26
@nx-cloud
Copy link
Copy Markdown

nx-cloud bot commented Apr 5, 2026

View your CI Pipeline Execution ↗ for commit 5ba92bc

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

☁️ Nx Cloud last updated this comment at 2026-04-07 23:34:52 UTC

@ImmutableJeffrey ImmutableJeffrey force-pushed the feat/audience-3-sdk-class branch from d72536d to 2ed1923 Compare April 5, 2026 23:44
@ImmutableJeffrey ImmutableJeffrey force-pushed the feat/audience-4-attribution-cdn branch from 15797da to 5f06b06 Compare April 5, 2026 23:44
@ImmutableJeffrey ImmutableJeffrey changed the title feat(audience): add attribution, CDN bundle, demo page, and README feat(audience): add CDN bundle, demo page, and README Apr 5, 2026
@ImmutableJeffrey ImmutableJeffrey force-pushed the feat/audience-3-sdk-class branch from c7592b3 to 6cc1921 Compare April 6, 2026 11:41
@ImmutableJeffrey ImmutableJeffrey force-pushed the feat/audience-4-attribution-cdn branch from 5f06b06 to 47c2df3 Compare April 6, 2026 11:41
@ImmutableJeffrey ImmutableJeffrey force-pushed the feat/audience-3-sdk-class branch from 6cc1921 to a830608 Compare April 6, 2026 15:05
@ImmutableJeffrey ImmutableJeffrey force-pushed the feat/audience-4-attribution-cdn branch 2 times, most recently from 00ff187 to f015514 Compare April 6, 2026 15:27
@ImmutableJeffrey ImmutableJeffrey force-pushed the feat/audience-3-sdk-class branch from a830608 to b5964c5 Compare April 6, 2026 15:27
@ImmutableJeffrey ImmutableJeffrey force-pushed the feat/audience-4-attribution-cdn branch from f015514 to 781137c Compare April 6, 2026 23:04
@ImmutableJeffrey ImmutableJeffrey force-pushed the feat/audience-3-sdk-class branch from b5964c5 to 16ecf2d Compare April 6, 2026 23:04
@ImmutableJeffrey ImmutableJeffrey force-pushed the feat/audience-4-attribution-cdn branch from 781137c to b7bbd2b Compare April 6, 2026 23:27
@ImmutableJeffrey ImmutableJeffrey force-pushed the feat/audience-3-sdk-class branch 2 times, most recently from 82b1a90 to 0375ff4 Compare April 6, 2026 23:38
@ImmutableJeffrey ImmutableJeffrey force-pushed the feat/audience-4-attribution-cdn branch 2 times, most recently from 2779dd6 to 872fdd8 Compare April 7, 2026 01:10
@ImmutableJeffrey ImmutableJeffrey force-pushed the feat/audience-3-sdk-class branch 2 times, most recently from 8fb34be to 37bcb3d Compare April 7, 2026 01:48
@ImmutableJeffrey ImmutableJeffrey force-pushed the feat/audience-4-attribution-cdn branch 2 times, most recently from 68b8dd9 to 0e52e4f Compare April 7, 2026 02:19
@ImmutableJeffrey ImmutableJeffrey force-pushed the feat/audience-3-sdk-class branch from 37bcb3d to 7cccbb2 Compare April 7, 2026 02:19
@ImmutableJeffrey ImmutableJeffrey force-pushed the feat/audience-4-attribution-cdn branch from 0e52e4f to 11599a2 Compare April 7, 2026 02:34
@ImmutableJeffrey ImmutableJeffrey force-pushed the feat/audience-3-sdk-class branch from 7cccbb2 to 0df2286 Compare April 7, 2026 02:34
@ImmutableJeffrey ImmutableJeffrey force-pushed the feat/audience-3-sdk-class branch from 0df2286 to ac5ad0d Compare April 7, 2026 03:28
@ImmutableJeffrey ImmutableJeffrey force-pushed the feat/audience-4-attribution-cdn branch from 11599a2 to e7836e4 Compare April 7, 2026 03:28
@ImmutableJeffrey ImmutableJeffrey force-pushed the feat/audience-3-sdk-class branch from ac5ad0d to 9bfbb9d Compare April 7, 2026 03:37
@ImmutableJeffrey ImmutableJeffrey force-pushed the feat/audience-4-attribution-cdn branch 2 times, most recently from 1a289c0 to d66a682 Compare April 7, 2026 04:05
@ImmutableJeffrey ImmutableJeffrey force-pushed the feat/audience-3-sdk-class branch from 9bfbb9d to 97fc84b Compare April 7, 2026 06:51
@ImmutableJeffrey ImmutableJeffrey force-pushed the feat/audience-4-attribution-cdn branch 2 times, most recently from 23ed51b to 85bb9da Compare April 7, 2026 07:30
@ImmutableJeffrey ImmutableJeffrey force-pushed the feat/audience-3-sdk-class branch from 97fc84b to 1074bb8 Compare April 7, 2026 09:26
@ImmutableJeffrey ImmutableJeffrey force-pushed the feat/audience-4-attribution-cdn branch from 85bb9da to d166e1e Compare April 7, 2026 09:27
@ImmutableJeffrey ImmutableJeffrey force-pushed the feat/audience-3-sdk-class branch from 1074bb8 to 0bf0c0b Compare April 7, 2026 09:46
@ImmutableJeffrey ImmutableJeffrey force-pushed the feat/audience-4-attribution-cdn branch from d166e1e to 9256a4e Compare April 7, 2026 09:46
Adds the consent state machine and documents the shared SDK config type.

ConsentManager: owns the three-tier consent model (none/anonymous/full)
and transition semantics. Platform-specific I/O is injected via
ConsentTransport interface and ConsentCallbacks — pure composition,
no abstract base classes. Web SDK provides fetch transport; future
game SDKs plug in platform HTTP clients.

AudienceSDKConfig: base config type with JSDoc on every field. Surface
SDKs extend this (e.g. WebSDKConfig adds consentSource).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ImmutableJeffrey ImmutableJeffrey force-pushed the feat/audience-3-sdk-class branch 5 times, most recently from 19d7d12 to 312c6c2 Compare April 7, 2026 23:12
…ssion lifecycle

Adds @imtbl/audience-web-sdk at packages/audience/web/ — the explicit,
typed tracking surface for game studios on web.

Architecture (core → sdk → web):
- ConsentManager + DebugLogger imported from @imtbl/audience-sdk
- WebSDKConfig extends AudienceSDKConfig (adds consentSource)
- Web provides fetch-based ConsentTransport and cookie-clearing callbacks
- Deleted sdk/context.ts wrapper — calls core collectContext directly

API: init, track, page, identify, alias, setConsent, reset, flush, shutdown

Design:
- Attribution stored in wire format (snake_case) from parse to send.
  TRACKED_PARAMS constant is the single source of truth.
- Message factory (baseMessage + enqueue) eliminates repeated boilerplate.
- Event names (SESSION_START, SESSION_END) are named constants.
- All public interfaces have JSDoc on every field.
- identify() type guard rejects null and arrays, truncates once.
- Helpers: isTrackingDisabled(), effectiveUserId(), startSession(),
  renewSession() — each method reads as intent, not mechanics.
- Multi-instance warning on double init without prior shutdown.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ImmutableJeffrey ImmutableJeffrey force-pushed the feat/audience-3-sdk-class branch from 312c6c2 to 5d003f8 Compare April 7, 2026 23:14
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ImmutableJeffrey ImmutableJeffrey force-pushed the feat/audience-4-attribution-cdn branch from 9256a4e to 5ba92bc Compare April 7, 2026 23:17
@ImmutableJeffrey ImmutableJeffrey force-pushed the feat/audience-3-sdk-class branch 4 times, most recently from 70cccb1 to fcf6063 Compare April 8, 2026 02:35
Base automatically changed from feat/audience-3-sdk-class to main April 8, 2026 04:36
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