experienceShown

fun experienceShown(context: Context, experienceAttributes: Map<String, String>, workspaceId: String? = null)

Tracks an "experience shown" impression for a single self-handled experience.

Call this when the experience is displayed to the user, not when its data is fetched.

Since

2.1.0

Parameters

context

The application context.

experienceAttributes

Attributes of the shown experience. Must contain the mandatory keys cid and experience; the map is discarded if either is absent.

workspaceId

The optional workspace ID for which the event is tracked. If null, the default SDK instance is used.

Throws

if the SDK is not initialized for the resolved instance and the integration validator is enabled.


fun experienceShown(context: Context, experienceAttributes: List<Map<String, String>>, workspaceId: String? = null)

Tracks an "experience shown" impression for several self-handled experiences in one call.

Each map is validated on its own: the valid ones are tracked and the invalid ones are discarded, so a single bad entry does not suppress the rest.

Since

2.1.0

Parameters

context

The application context.

experienceAttributes

One map of attributes per shown experience. Each must contain the mandatory keys cid and experience.

workspaceId

The optional workspace ID for which the event is tracked. If null, the default SDK instance is used.

Throws

if the SDK is not initialized for the resolved instance and the integration validator is enabled.