December 2018
Intermediate to advanced
414 pages
10h 19m
English
In this example, we'll adapt both Mixpanel and Google Analytics for Firebase. Let's have a look at how both look, and how to use them:
open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate { /* ... */ open func track(event: String?, properties: Properties? = nil) { /* ... */ }}
It is possible to use Mixpanel to track an event with additional properties:
Mixpanel.mainInstance() .track(event: "Read Book", properties: ["name": "Design Patterns with Swift", "format": "paperback"])
Google Analytics for Firebase, however, exposes the tracking method through a static method from Objective-C:
NS_SWIFT_NAME(Analytics)@interface FIRAnalytics : NSObject/* ... */+ (void)logEventWithName:(NSString ...
Read now
Unlock full access