AnalyticsCollecting
public protocol AnalyticsCollecting : AnyObject, Sendable
The AnalyticsCollecting protocol defines an interface for collecting AdswizzSDK analytics data. All events are delivered on a serial background executor.
Note that the AnalyticsConnector class conforms to AnalyticsCollecting.
Callbacks are delivered off the main actor. A connector that needs main-actor state must hop there itself (e.g. via Task { @MainActor in … }).
-
Log an event matched to a category and level.
Declaration
Swift
func log(_ event: AnalyticsEvent, _ timestamp: Date)Parameters
eventevent to log
-
Force a send to all connectors. When you receive this call, the connector should try to flush all its stored events if
forcedis true.Declaration
Swift
func send(forced: Bool)Parameters
forcedtrue if the action is required immediately