Skip to content

feat(pixel): add identityType parameter to identify()#2840

Merged
bkbooth merged 2 commits intomainfrom
claude/epic-raman
Apr 9, 2026
Merged

feat(pixel): add identityType parameter to identify()#2840
bkbooth merged 2 commits intomainfrom
claude/epic-raman

Conversation

@bkbooth
Copy link
Copy Markdown
Contributor

@bkbooth bkbooth commented Apr 9, 2026

Summary

  • Add required identityType: IdentityType parameter (second arg) to Pixel.identify() so the backend can distinguish which identity system a user ID belongs to (passport, steam, epic, etc.)
  • Uses the shared IdentityType union from @imtbl/audience-core — same source of truth as the web SDK
  • Fix bootstrap command handler to forward all three args (userId, identityType, traits) to identify()
  • Updated tests to cover the new parameter, including a new test for calling identify without traits

API change

// Before
pixel.identify('user-1', { email: 'test@example.com' });

// After
pixel.identify('user-1', 'passport', { email: 'test@example.com' });

Test plan

  • Existing pixel tests updated to pass identityType
  • New test: identify() without traits still sends identityType
  • Bootstrap test updated to queue and assert 3-arg identify
  • All 65 pixel tests pass

Closes SDK-77

🤖 Generated with Claude Code

Add required identityType parameter (second arg) to Pixel.identify() so
the backend can distinguish which identity system a user ID belongs to
(passport, steam, epic, etc.). Uses the shared IdentityType union from
@imtbl/audience-core for parity with the web SDK.

Closes SDK-77

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bkbooth bkbooth requested a review from a team as a code owner April 9, 2026 02:13
@nx-cloud
Copy link
Copy Markdown

nx-cloud bot commented Apr 9, 2026

View your CI Pipeline Execution ↗ for commit 1eacdbe

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

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

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

✅ Pixel Bundle Size — @imtbl/pixel

Metric Size Delta vs main
Gzipped 4184 bytes (4.08 KB) +21 bytes
Raw (minified) 11245 bytes +22 bytes

Budget: 10.00 KB gzipped (warn at 8.00 KB)

nattb8
nattb8 previously approved these changes Apr 9, 2026
The bootstrap command handler only forwarded two args to identify(),
silently dropping traits. Forward all three args to match the updated
Pixel.identify(userId, identityType, traits?) signature.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bkbooth bkbooth added this pull request to the merge queue Apr 9, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 9, 2026
@bkbooth bkbooth added this pull request to the merge queue Apr 9, 2026
Merged via the queue into main with commit c54a577 Apr 9, 2026
12 of 13 checks passed
@bkbooth bkbooth deleted the claude/epic-raman branch April 9, 2026 06:19
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.

3 participants