identify with track

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-08-12 21:14:39 +02:00
parent 9fcc31319d
commit c34c2cb93b
2 changed files with 81 additions and 23 deletions

View File

@@ -19,7 +19,26 @@ Sets global properties that will be included with every subsequent event.
### track
Tracks a custom event with the given name and optional properties.
Tracks a custom event with the given name and optional properties.
**Tips**
You can identify the user directly with this method.
```js filename="Example shown in JavaScript"
track('your_event_name', {
foo: 'bar',
baz: 'qux',
// reserved property name
__identify: {
profileId: 'your_user_id', // required
email: 'your_user_email',
firstName: 'your_user_name',
lastName: 'your_user_name',
avatar: 'your_user_avatar',
}
});
```
### identify