Analytics
-
Records analytics data and sends it to the Mobile Analytics service.
To subscribe to automated analytics recording, pass the
DeviceEvent
options 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 withuserIdentity
using, 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
Analytics
class will listen for. Whenever an event of the specified type occurs, analytics data for that event will be recorded.Note
Register DeviceEvents inAnalytics.initialize(appName:apiKey:hasUserContext:deviceEvents:)
.Declaration
Swift
public enum DeviceEvent