postMetricsDataForFailedEvent

fun postMetricsDataForFailedEvent(partner: String?, event: TrackingEvent, auctionIdentifier: String?, chartboostMediationError: ChartboostMediationError, chartboostMediationErrorMessage: String?, placementType: String? = null, size: <Error class: unknown class>? = null, loadStart: Long? = null, backgroundDuration: Long? = null, loadId: String? = null, eventResult: EventResult? = null, networkType: String? = null, lineItemId: String? = null, partnerPlacement: String? = null, adEventTrackers: Map<TrackingEvent, List<ServerEventTracker>> = emptyMap())

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).

Typically, these failures would be caused by client-side internal issues. The partner might even succeed if the event does complete.

In cases like this, the payload might not be conformant to pre-defined schemas, as long as it indicates there's an issue.

It handles both global and ad-specific event trackers. Global trackers are always processed, even if adEventTrackers is empty. This ensures that essential tracking data is sent, regardless of whether ad-specific trackers are present. Ad-specific trackers, if provided, are processed in addition to the global ones.

Parameters

partner

The partner for whom the event failed.

event

The ad lifecycle event that failed.

auctionIdentifier

The auction ID.

chartboostMediationError

The Chartboost Mediation error.

chartboostMediationErrorMessage

The Chartboost Mediation error message.

placementType

The placement type.

size

The ad size.

loadStart

The start time, in milliseconds, of a load.

backgroundDuration

The amount of time, in milliseconds, that a load was being performed while the app was in the background.

loadId

The load ID.

eventResult

The result of the ad lifecycle event.

networkType

The network type (i.e. "bidding" or "mediation").

lineItemId

The line item ID.

partnerPlacement

The partner placement.

adEventTrackers

A map of event trackers specific to this ad. This map may be empty, in which case only global event trackers will be processed.