Skip to content

Conversation

@FabricioFFC
Copy link

Summary

Forwards user_properties from ExperimentUser to exposure events by spreading them into the $set block alongside the existing experiment-related properties. This ensures that custom user properties set on the user object are included when exposure events are tracked.

Fixes: #72

Note: This change could also be applied to AmplitudeAssignmentService, but since it's being deprecated, I chose to leave it unchanged. Please let me know if you'd prefer it to be updated as well.

Checklist

  • Does your PR title have the correct title format?
  • Does your PR have a breaking change?:

@macroscopeapp
Copy link

macroscopeapp bot commented Feb 6, 2026

Update packages/node/src/exposure/exposure-service.ts::toExposureEvents to send ExperimentUser.user_properties in exposure event user_properties.$set for exposure tracking

Merge ExperimentUser.user_properties into the exposure event user_properties['$set'] and add a Jest test validating the merged payload in exposure-service.test.ts. See implementation in exposure-service.ts.

📍Where to Start

Start with toExposureEvents in exposure-service.ts.


Macroscope summarized bb3d145.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

user_properties from ExperimentUser are not forwarded to exposure/assignment events

1 participant