AnalyticsCustomData

@MainActor
@objc(AASDKAnalyticsCustomData)
public protocol AnalyticsCustomData

Analytics interface to customize AnalyticsEvent entries.

Custom data is host-provided configuration read on the main actor while an event is being constructed. Note that Its params are snapshotted into the (immutable, Sendable) event before delivery, so this type is main-actor isolated.

  • Custom params will be attached to each AnalyticsEvent during the ad lifecycle. See the customParams property from AnalyticsEvent.

    Declaration

    Swift

    @MainActor
    var params: [String : Any]? { get }
  • sendableParams Extension method

    A Sendable snapshot of params, taken on the main actor, safe to attach to an AnalyticsEvent for off-main delivery. String values are matched explicitly; any numeric or boolean value is preserved as-is; anything else is captured by its string description.

    Declaration

    Swift

    @MainActor
    public var sendableParams: [String : any Sendable]? { get }