offeringClicked

fun offeringClicked(context: Context, offeringAttribute: Map<String, Any>, experienceAttribute: Map<String, Any>? = null, workspaceId: String? = null)

Tracks an "offering clicked" interaction, and the "experience clicked" interaction of the associated experience when experienceAttribute is supplied.

Note the parameter order: the offering comes first and the experience second, which is the reverse of MoEPersonalizeHelper.offeringClicked. Both are maps, so passing them the wrong way round compiles and silently attributes each event to the other's campaign — pass them by name if there is any doubt.

The two events are validated independently. An invalid offering map suppresses both, while an invalid experience map only suppresses the experience click.

Since

2.1.0

Parameters

context

The application context.

offeringAttribute

Attributes of the clicked offering. Must contain the mandatory keys moe_offering_id, moe_offering_name, moe_offering_type, moe_decision_policy_id and moe_decision_policy_name.

experienceAttribute

Attributes of the experience the offering belongs to, containing the mandatory keys cid and experience. Pass null when the offering has no associated experience, in which case only the offering click is tracked.

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.