MetricsManager

Handles metrics collection and reporting for the Mediation SDK.

Functions

Link copied to clipboard
fun end(id: String, isSuccess: Boolean, error: ChartboostMediationError? = null)

End tracking metrics for an ad lifecycle event.

Link copied to clipboard

Get the event in progress for the given ID.

Link copied to clipboard
fun postMetricsData(data: Set<Metrics>, loadId: String? = null, backgroundDurationMs: Long? = null, eventResult: EventResult? = null)

Post metrics data payload to the server on an ad lifecycle event basis.

Link copied to clipboard
fun postMetricsDataForFailedEvent(partner: String?, event: Endpoints.Sdk.Event, auctionIdentifier: String?, chartboostMediationError: ChartboostMediationError, chartboostMediationErrorMessage: String?, placementType: String? = null, size: Size? = null, backgroundDuration: Long? = null, loadId: String? = null, eventResult: EventResult? = null, networkType: String? = null, lineItemId: String? = null, partnerPlacement: String? = null)

Prepare and post a default metrics payload for event failures to the server. Note: This is not the same as sending metrics data for a failed partner, but rather a failure preventing the event itself from completing (e.g. adapter not found, or no network connection).

Link copied to clipboard
fun start(eventType: MetricsEvent.EventType, partner: String): String

Start tracking metrics for a new ad lifecycle event.