Skip to content

Commit

Permalink
chore: add docs for mixpanel user reset
Browse files Browse the repository at this point in the history
  • Loading branch information
martinbroos committed Mar 18, 2024
1 parent 135878a commit 1daf368
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions doc/mixpanel_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,18 @@ They will be remembered for the duration of the session. Even if the user naviga

## Mixpanel users

TODO how to handle reset mixpanel user
Mixpanel events can be attached to a user. This is done in the backend on user login, see [FHMixpanelBundle](https://github.com/freshheads/FHMixpanelBundle) for more information.
When using JWT tokens for authentication the token can become invalid at any time. This means that the user can become anonymous at any time.
When the user becomes anonymous, the frontend should also reset the user in mixpanel.

## Event naming conventions
FHMixpanelBundle has an endpoint to do this reset user action. This library doesn't provide an implementation for it but could look like this:

TODO - how to name events
```tsx
function resetMixpanelUser() {
executeDeleteRequest('_mixpanel/transaction');
}
```

## Event types
## Event naming conventions

TODO - how to override the event types
TODO - how to name events

0 comments on commit 1daf368

Please sign in to comment.