feat(audience): scaffold @imtbl/pixel package with attribution, loader, and snippet#2829
Merged
feat(audience): scaffold @imtbl/pixel package with attribution, loader, and snippet#2829
Conversation
…r, and snippet Add the pixel package scaffold and three self-contained modules that have no dependency on PR #2824. The package builds to a single IIFE bundle (dist/imtbl.js) targeting <10KB gzipped (currently 823 bytes). Modules: - attribution: UTM params, ad click IDs, referrer, landing page (session-cached) - loader: command-queue pattern (window.__imtbl) with pre-load replay - snippet: embeddable <script> tag generator for studio integration Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
View your CI Pipeline Execution ↗ for commit cfab2ca
☁️ Nx Cloud last updated this comment at |
nattb8
reviewed
Apr 7, 2026
… reference Add dclid (Google DV360) and li_fat_id (LinkedIn) to match the Tracking Pixel Event Reference doc. Also add referral_code parsing and touchpoint_type derivation (set to 'click' when UTMs or click IDs are present). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Author
|
Good catch @nattb8 — no reason to leave them out. Added Also added |
nattb8
approved these changes
Apr 7, 2026
rodrigo-fournier-immutable
approved these changes
Apr 7, 2026
bkbooth
added a commit
that referenced
this pull request
Apr 7, 2026
…sent Resolve conflicts: keep HEAD versions for pixel package config, re-delete attribution files that were reintroduced from main (#2829), add packages/audience/sdk from main to pnpm-workspace.yaml. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
Scaffolds the
@imtbl/pixelpackage and ships three self-contained modules with zero dependency on PR #2824:attribution.ts): Parses UTM params, ad click IDs (gclid/fbclid/ttclid/msclkid), referrer, and landing page — session-cached insessionStorageloader.ts): GA-style command-queue pattern (window.__imtbl) with pre-load command replaysnippet.ts): Generates the embeddable<script>tag for studio integrationPackage builds to a single IIFE bundle (
dist/imtbl.js) — 1.52 KB raw / 823 bytes gzipped, well under the 10 KB budget.20 tests passing across 3 suites. Lint and typecheck clean.
What's next (after PR #2824 merges)
ConsentLevel/ConsentStatustypes,queue.purge())storagePrefix,collectContext(lib, ver),flushUnload())Resolves: SDK-50
Test plan
pnpm --filter @imtbl/pixel test— 20/20 passingpnpm --filter @imtbl/pixel build— IIFE bundle producedpnpm --filter @imtbl/pixel lint— cleanpnpm --filter @imtbl/pixel typecheck— clean🤖 Generated with Claude Code