AirshipAnalyticsProtocol

public protocol AirshipAnalyticsProtocol : AnyObject, Sendable

Analytics protocol

  • The current session ID.

    Declaration

    Swift

    var sessionID: String { get }
  • Adds a custom event.

    Declaration

    Swift

    func recordCustomEvent(_ event: CustomEvent)

    Parameters

    event

    The event.

  • Tracks a custom event.

    Declaration

    Swift

    func recordRegionEvent(_ event: RegionEvent)

    Parameters

    event

    The event.

  • Associates identifiers with the device. This call will add a special event that will be batched and sent up with our other analytics events. Previous associated identifiers will be replaced.

    Declaration

    Swift

    func associateDeviceIdentifiers(
        _ associatedIdentifiers: AssociatedIdentifiers
    )

    Parameters

    associatedIdentifiers

    The associated identifiers.

  • The device’s current associated identifiers.

    Declaration

    Swift

    func currentAssociatedDeviceIdentifiers() -> AssociatedIdentifiers

    Return Value

    The device’s current associated identifiers.

  • Initiates screen tracking for a specific app screen, must be called once per tracked screen.

    Declaration

    Swift

    @MainActor
    func trackScreen(_ screen: String?)

    Parameters

    screen

    The screen’s identifier.

  • A publisher of event data that is tracked through Airship.

    Declaration

    Swift

    var eventPublisher: AnyPublisher<AirshipEventData, Never> { get }