Skip to content

Commit

Permalink
fix: mixpanel identify
Browse files Browse the repository at this point in the history
  • Loading branch information
matisiekpl committed Jan 23, 2025
1 parent 42add60 commit 5badef3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/repositories/points_repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ class PointsRepository {
if (payload.containsKey('img')) {
user = user.copyWith(avatar: payload['img']['href']);
}
mixpanel.identify(user.id.toString());
mixpanel.getPeople().set('\$user_id', user.id);
mixpanel.getPeople().set('\$name', user.name);
mixpanel.getPeople().set('\$avatar', user.avatar);
Expand All @@ -143,6 +144,7 @@ class PointsRepository {
}

Future<void> logout() async {
await mixpanel.reset();
token = null;
}

Expand Down

0 comments on commit 5badef3

Please sign in to comment.