experienceClicked

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

Tracks an "experience clicked" interaction for a single self-handled experience.

Unlike the impression events, this is tracked as an interactive event and so also updates the user's last-interaction data.

Since

2.1.0

Parameters

context

The application context.

experienceAttributes

Attributes of the clicked 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 experienceClicked(context: Context, experienceAttributes: List<Map<String, String>>, workspaceId: String? = null)

Tracks an "experience clicked" interaction 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 clicked 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.