feat(audience): add @imtbl/audience-web-sdk#2818
Closed
ImmutableJeffrey wants to merge 19 commits into
Closed
Conversation
|
View your CI Pipeline Execution ↗ for commit 8df80cc
☁️ Nx Cloud last updated this comment at |
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx affected -t build,lint,test |
❌ Failed | 25s | View ↗ |
nx run-many -p @imtbl/sdk,@imtbl/checkout-widge... |
✅ Succeeded | 2s | View ↗ |
☁️ Nx Cloud last updated this comment at 2026-04-04 04:16:17 UTC
Foundation package at packages/audience/sdk/ with typed events, message queue, transport, and browser context collection. Wire format aligned with backend OAS. Also excludes flaky x-client integration tests that hit live APIs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
New @imtbl/audience-web-sdk package wired into the monorepo. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
init, page, track, identify (known + anonymous), alias, setConsent, reset, flush, shutdown. Consent-aware gating. Server reconciliation on init. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Self-contained IIFE (4.0 KB gzipped). window.ImmutableWebSDK global. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
cookie, queue, transport, context, validation modules. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
120 tests total (82 web + 38 shared SDK). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Interactive page with dark/light mode toggle (onyx theme). Exercises every API method against local, dev, or sandbox backend. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Install, init, consent, events, identity, CDN usage, cookies, wire format. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3306a1e to
92d82ab
Compare
The no-bitwise disable was left over from a previous version. The current code uses Math.trunc and modulo, no bitwise ops. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
nattb8
reviewed
Apr 4, 2026
Contributor
There was a problem hiding this comment.
a lot of this is already in audience/core. queue, storage etc as pixel will use it too
Contributor
Author
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
Audience web SDK (
packages/audience/web/) — explicit, typed, consent-aware event tracking and identity management for studio web surfaces. Sits alongside the pixel (same cookies, same backend, differentsurfacediscriminator).Also includes
@imtbl/audienceshared SDK with backend-aligned wire format (eventTimestamp, eventName, identityType, fromId/fromType/toId/toType, surface field).Stats
Test plan
cd packages/audience/web && pnpm test— 82 tests passcd packages/audience/sdk && pnpm test— 38 tests passcd packages/audience/web && pnpm build— ESM + CJS + CDN bundles producedcd packages/audience/web && pnpm typecheck— cleanpnpm demo→ select dev environment → fire events → verify in Network tab🤖 Generated with Claude Code