Skip to content

Commit

Permalink
Add the new SDK Initialized events to the class
Browse files Browse the repository at this point in the history
These events are used internally to help identify certain events automatically.
  • Loading branch information
anthonycastelli committed Apr 19, 2024
1 parent f0895c8 commit d82540f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/appfit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ class AppFit {
// and set the userId to null. This is to ensure that we have the most
// up-to-date information for the events.
this.eventDigester.identify(null);

// This is a unique event that is used specifically to track when the
// AppFit SDK has been initialized.
// This is an internal event.
trackEvent("appfit_sdk_initialized");
}

/// Tracks an event with the provided [eventName] and [properties].
Expand All @@ -61,5 +66,10 @@ class AppFit {
/// resulting in the user being anonymous.
void identifyUser(String? userId) async {
await eventDigester.identify(userId);

// This is a unique event that is used specifically to track when the
// AppFit SDK has been identified a user
// This is an internal event.
trackEvent("appfit_user_identified");
}
}

0 comments on commit d82540f

Please sign in to comment.