Skip to content

Instantly share code, notes, and snippets.

@lucasPelizza
Created February 26, 2020 15:44
Show Gist options
  • Save lucasPelizza/a3f126a7c15e423f5fb070601473bba5 to your computer and use it in GitHub Desktop.
Save lucasPelizza/a3f126a7c15e423f5fb070601473bba5 to your computer and use it in GitHub Desktop.
class AmplitudeAnalyticsService: AnalyticsServiceType {
private static let Token = "KEY"
public var trackedEvents: [AnalyticsSectionEvent] {
return AnalyticsSectionEvent.allCases
}
public func initialize(application: UIApplication, launchOptions: [UIApplication.LaunchOptionsKey: Any]?) {
Amplitude.instance().initializeApiKey(AmplitudeAnalyticsService.Token)
}
public func track(event: AnalyticsEvent) {
Amplitude.instance().logEvent(event.name, withEventProperties: event.eventProperties)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment