Created
February 26, 2020 15:44
-
-
Save lucasPelizza/a3f126a7c15e423f5fb070601473bba5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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