User profile changed
Learn how to track changes related to a user's account.
This event tracks any changes related to a user's profile.
Automatically tracked
The SDK automatically tracks this event when you update the user profile.
Implementation
Here is an example of how to track this event:
example.js
JavaScript
12345678
import croct from '@croct/plug';
croct.user.edit() .set('name', 'John Doe') .set('email', 'john@croct.com') .set('custom.plan', 'free') .combine('activities', 'sign-up') .save();
Input properties
This event has no input properties.
Processed properties
These properties are automatically tracked:
- externalUserIdstring
The user's unique identifier provided by the application, such as a UUID or a username.
The value must be between 1 and 100 characters long.
- patchobject
A set of operations performed on the user profile.
Payload examples
Below are some payload examples for this event:
12345678910111213141516171819202122232425262728
{ "type": "userProfileChanged", "externalUserId": "0e8d3d6e-4b6d-4b7b-8e0f-2e3b9e7b3e4d", "patch": { "operations": [ { "type": "set", "path": "name", "value": "John Doe" }, { "type": "set", "path": "email", "value": "john@croct.com", }, { "type": "set", "path": "custom.plan", "value": "free", }, { "type": "combine", "path": "activities", "value": "sign-up", } ] }}