Skip to content

feat(pixel): remove identify() from pixel tracker#2846

Merged
bkbooth merged 2 commits intomainfrom
feat/pixel-remove-identify
Apr 10, 2026
Merged

feat(pixel): remove identify() from pixel tracker#2846
bkbooth merged 2 commits intomainfrom
feat/pixel-remove-identify

Conversation

@bkbooth
Copy link
Copy Markdown
Contributor

@bkbooth bkbooth commented Apr 10, 2026

Summary

Closes SDK-101

  • Removes the identify() method from the Pixel class and the 'identify' command handler from bootstrap.ts
  • Removes associated test cases (−95 lines, net −91)
  • No changes to @imtbl/audience-core or @imtbl/audience-sdk — the SDK retains full identify/alias support

Why

The pixel is a passive tracking surface — its job is auto-collecting device fingerprints, attribution context, and page views with zero instrumentation from the studio. identify() conflicts with this design:

  1. No realistic caller. The pixel is integrated by pasting a <script> snippet onto a landing page. The integrator doesn't have access to userId or identityType — those come from authenticated sessions, which is Web SDK territory.
  2. Only works at full consent, which is not the pixel's primary use case (anonymous consent for device fingerprinting/attribution).
  3. Identity signals are already captured passively via form submission auto-capture (email hashing at full consent).
  4. Sharpens the surface boundary: Pixel = passive attribution. SDK = active instrumentation.

Bundle impact: −315 bytes raw / −83 bytes gzipped (modest, since TS types are erased at compile time — the real win is architectural clarity).

Test plan

  • All 74 pixel tests pass after removal
  • Verify pixel bundle builds successfully
  • Confirm no identify-related exports leak from the pixel package

🤖 Generated with Claude Code

@bkbooth bkbooth requested a review from a team as a code owner April 10, 2026 05:41
The pixel is a passive tracking surface — studios needing user-level
identification should use @imtbl/audience-sdk instead. This sharpens
the boundary between the two surfaces and removes dead code that no
realistic integrator would call.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bkbooth bkbooth force-pushed the feat/pixel-remove-identify branch from aa411f3 to 4316bf9 Compare April 10, 2026 05:43
@nx-cloud
Copy link
Copy Markdown

nx-cloud bot commented Apr 10, 2026

View your CI Pipeline Execution ↗ for commit cfc626c

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

☁️ Nx Cloud last updated this comment at 2026-04-10 06:04:06 UTC

@nx-cloud
Copy link
Copy Markdown

nx-cloud bot commented Apr 10, 2026

View your CI Pipeline Execution ↗ for commit 4316bf9

Command Status Duration Result
nx run-many -p @imtbl/sdk,@imtbl/checkout-widge... ✅ Succeeded 3s View ↗

☁️ Nx Cloud last updated this comment at 2026-04-10 05:44:48 UTC

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 10, 2026

✅ Pixel Bundle Size — @imtbl/pixel

Metric Size Delta vs main
Gzipped 5412 bytes (5.28 KB) -104 bytes
Raw (minified) 14673 bytes -492 bytes

Budget: 10.00 KB gzipped (warn at 8.00 KB)

nattb8
nattb8 previously approved these changes Apr 10, 2026
With identify() gone, nothing ever sets userId — the ternaries
were always evaluating to undefined. Replace with explicit
undefined to make the intent clear.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bkbooth bkbooth enabled auto-merge April 10, 2026 05:53
@bkbooth bkbooth added this pull request to the merge queue Apr 10, 2026
bkbooth added a commit that referenced this pull request Apr 10, 2026
The identify() method is being removed from the pixel (PR #2846).
Update the README to remove the Identity section and adjust the
full consent description to reflect that identity signals come
only from form submission auto-capture.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 10, 2026
@bkbooth bkbooth added this pull request to the merge queue Apr 10, 2026
Merged via the queue into main with commit 008b6ea Apr 10, 2026
8 checks passed
@bkbooth bkbooth deleted the feat/pixel-remove-identify branch April 10, 2026 06:38
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.

2 participants