Analytics

Properties

Link copied to clipboard

Notified whenever cached events are discarded undelivered. Null by default: discards are then only logged. May be set before or after setup.

Link copied to clipboard

The opaque user id currently in effect for reported events, or null before setup has run.

Functions

Link copied to clipboard
open override fun reportClickOrganic(entity: Entity, placement: Placement, opaqueUserId: String? = null, id: String? = null, occurredAt: String? = null, deviceType: Device? = null, channel: Channel? = null, page: Page? = null, clickType: ClickType? = null)

Reports a single organic click

Link copied to clipboard
open override fun reportClickPromoted(resolvedBidId: String, placement: Placement, opaqueUserId: String? = null, id: String? = null, occurredAt: String? = null, deviceType: Device? = null, channel: Channel? = null, page: Page? = null, clickType: ClickType? = null)

Reports a single promoted click (with a resolvedBidId)

Link copied to clipboard
open override fun reportImpressionOrganic(entity: Entity, placement: Placement, opaqueUserId: String? = null, id: String? = null, occurredAt: String? = null, deviceType: Device? = null, channel: Channel? = null, page: Page? = null)

Reports a single organic impression

Link copied to clipboard
open override fun reportImpressionPromoted(resolvedBidId: String, placement: Placement, opaqueUserId: String? = null, id: String? = null, occurredAt: String? = null, deviceType: Device? = null, channel: Channel? = null, page: Page? = null)

Reports a single promoted impression (with a resolvedBidId)

Link copied to clipboard
fun reportImpressions(impressions: List<Impression>)
Link copied to clipboard
open override fun reportPageView(page: Page, opaqueUserId: String? = null, id: String? = null, occurredAt: String? = null, deviceType: Device? = null, channel: Channel? = null)

Reports a page view event.

Link copied to clipboard
open override fun reportPurchase(items: List<PurchasedItem>, id: String, opaqueUserId: String? = null, occurredAt: String? = null, deviceType: Device? = null, channel: Channel? = null, page: Page? = null)

Reports a purchase event.

Link copied to clipboard
fun setup(@NonNull application: Application, @NonNull identity: UserIdentity, @NonNull token: String)

Setup initial properties required for the analytics library.

fun setup(@NonNull application: Application, @NonNull opaqueUserId: String, @NonNull token: String)

Setup initial properties required for the analytics library, Call this from the Application class, before submitting any event, Or when a new opaqueUserId or bearer token has to be used.