Skip to content

feat(audience): rename event property keys to snake_case [SDK-412]#2875

Open
nattb8 wants to merge 1 commit into
mainfrom
feat/sdk-412-snake-case-event-props
Open

feat(audience): rename event property keys to snake_case [SDK-412]#2875
nattb8 wants to merge 1 commit into
mainfrom
feat/sdk-412-snake-case-event-props

Conversation

@nattb8
Copy link
Copy Markdown
Contributor

@nattb8 nattb8 commented May 22, 2026

Renames all multi-word Audience event property keys from camelCase to snake_case to align with industry standard (Segment, GA4). Event names were already snake_case; this makes properties consistent.

UTM params and click IDs (utm_source, gclid, etc.) are unchanged — they were already snake_case.

Fixes SDK-412.


Note

Medium Risk
Breaking change to the emitted/typed event payload schema by renaming many properties (including session_id) from camelCase to snake_case across both the Pixel and Web SDK, which can impact downstream analytics pipelines and consumers expecting old keys.

Overview
Standardises Audience event property keys to snake_case across the stack. The Pixel now emits session_id, form_*, field_names, link_*, and email_hash instead of their camelCase equivalents, and includes third-party cookie IDs as ga_client_id / fb_click_id / fb_browser_id.

The Web SDK’s typed event property interfaces (e.g. game_id, item_id, transaction_id, duration_sec) and runtime message construction were updated accordingly so page, track, session_start, and session_end all carry session_id.

Docs, sample app field metadata, and test suites were updated to match the new property names.

Reviewed by Cursor Bugbot for commit 4f8531b. Bugbot is set up for automated code reviews on this repo. Configure here.

@nattb8 nattb8 requested a review from a team as a code owner May 22, 2026 01:34
@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented May 22, 2026

View your CI Pipeline Execution ↗ for commit 4f8531b

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

☁️ Nx Cloud last updated this comment at 2026-05-22 02:53:28 UTC

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 22, 2026

✅ Pixel Bundle Size — @imtbl/pixel

Metric Size Delta vs main
Gzipped 6347 bytes (6.19 KB) -3 bytes
Raw (minified) 17468 bytes +18 bytes

Budget: 10.00 KB gzipped (warn at 8.00 KB)

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 22, 2026

✅ Audience Bundle Size — @imtbl/audience

Metric Size Delta vs main (60a837f)
Gzipped 18710 bytes (18.27 KB) +6 bytes
Raw (minified) 54679 bytes +4 bytes

Budget: 24.00 KB gzipped (warn at 20.00 KB)

@nattb8 nattb8 enabled auto-merge May 22, 2026 01:40
@nattb8 nattb8 added this pull request to the merge queue May 22, 2026
Comment thread packages/audience/pixel/src/pixel.test.ts
@nattb8 nattb8 removed this pull request from the merge queue due to a manual request May 22, 2026
@nattb8 nattb8 force-pushed the feat/sdk-412-snake-case-event-props branch from 3396989 to 46fefc0 Compare May 22, 2026 01:55
@nattb8 nattb8 enabled auto-merge May 22, 2026 01:55
Comment thread packages/audience/sdk/src/sdk.ts
Comment thread packages/audience/sdk/src/events.ts
@nattb8 nattb8 added this pull request to the merge queue May 22, 2026
@nattb8 nattb8 removed this pull request from the merge queue due to a manual request May 22, 2026
@nattb8 nattb8 force-pushed the feat/sdk-412-snake-case-event-props branch 2 times, most recently from 8df2d44 to 235c5e7 Compare May 22, 2026 02:11
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 235c5e7. Configure here.

Comment thread packages/audience/sdk-sample-app/README.md Outdated
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@nattb8 nattb8 force-pushed the feat/sdk-412-snake-case-event-props branch from 235c5e7 to 4f8531b Compare May 22, 2026 02:52
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