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 in initialize(appName:apiKey:hasUserContext:deviceEvents:).

    Custom events can be recorded with log(metadata:). You can also define the current application user with userIdentity 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 send(completionHandler:).

    See more

    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 in Analytics.initialize(appName:apiKey:hasUserContext:deviceEvents:).
    See more

    Declaration

    Swift

    public enum DeviceEvent