Analytics
-
Records analytics data and sends it to the Mobile Analytics service.
To subscribe to automated analytics recording, pass the
DeviceEventoptions that you want recorded ininitialize(appName:apiKey:hasUserContext:deviceEvents:).Custom events can be recorded with
log(metadata:). You can also define the current application user withuserIdentityusing, for example, the user’s login information.When you are ready to send all of the recorded data to the Mobile Analytics service, use
See moresend(completionHandler:).Declaration
Swift
public class Analytics
-
The set of device events that the
Analyticsclass will listen for. Whenever an event of the specified type occurs, analytics data for that event will be recorded.See moreNote
Register DeviceEvents inAnalytics.initialize(appName:apiKey:hasUserContext:deviceEvents:).Declaration
Swift
public enum DeviceEvent
View on GitHub
Analytics Reference