Personalize Experience Events tracking

This document outlines the new methods available in the MoEngage iOS SDK to report impressions and clicks for experiences fetched using the MoEngage Personalize API. These methods are currently available only for the iOS SDK.

Pre-Requisites

SDK version

You must update your Native iOS SDK version to 10.01.0 or higher.

MoEngage Account Configuration

Ensure your MoEngage workspace is enabled to utilize the Personalize API. Refer to this article for details on setting up Personalize API experiences.

Reporting Experience Shown events

The SDK provides helper APIs to track shown events, refer the API documentation for more details.

Impressions should be reported when an experience is visually presented to the user.

Single Experience

To report an impression for a single experience, pass experience_context of the experience as a map.

experience_context is a JSON object that is returned as part of the response of the Personalize API request.

Swift Objective C
MoEngageSDKAppPersonalization.sharedInstance.experienceShown(experienceAttribute: experienceContext)

Mulitple Experiences

To track the experience shown event for multiple experiences use, pass the list of experience_context of each experience as a map.

SwiftObjective C
MoEngageSDKAppPersonalization.sharedInstance.experienceShown(experienceAttributes: [experienceContext1, experienceContext2, experienceContext3])

Reporting Experience Clicked events

The SDK provides helper APIs to track clicked events, refer the API documentation for more details.

Clicked events should be reported when a user clicks on any element that has been personalized using the response of the Personalize API.

Single Experience

To report a click event for a single experience, pass the experience_context of the experience as a map.

SwiftObjective C
MoEngageSDKAppPersonalization.sharedInstance.experienceClicked(experienceAttribute: experienceContext)

Multiple Experiences

To track the experience shown event for multiple experiences use, pass the array of experience_context of each experience as a map.

SwiftObjective C
MoEngageSDKAppPersonalization.sharedInstance.experienceClicked(experienceAttributes: [experienceContext1, experienceContext2, experienceContext3])

You can optionally include a b_id key in the experience_context object to provide additional context about the click. Its value should describe the specific component or interaction within the experience that was clicked. This is particularly useful for experiences composed of multiple interactive elements, helping to distinguish between clicks on different parts of the same overall experience.

Previous

Next

Was this article helpful?
0 out of 0 found this helpful

How can we improve this article?