Skip to main content
This document outlines the new methods available in the MoEngage Personalize SDK to report impressions and clicks for Offerings fetched using the MoEngage Personalize SDK or directly via the MoEngage Personalize API.

Pre-Requisites

SDK Integration

1

Web SDK Integration

Refer to this article to integrate the Web SDK on your website.
2

Personalize SDK Integration

Refer to this article to integrate the Personalize SDK on your website.

MoEngage Account Configuration

Ensure your MoEngage workspace is enabled to utilize Offerings. Refer to this article for details on setting up Offerings.

Reporting Offering Shown events

The SDK provides a method to track offering shown events. Impressions should be reported when an Offering is visually presented to the user. To report an impression offering, pass the offeringContext as a map.
<script type="text/javascript">
Moengage.personalize.offeringShown(offeringContext)
</script>

Reporting Offering Clicked events

The SDK provides a method to track offering clicked events. Clicked events should be reported when a user clicks on any offering contained in the response of the Personalize API. To report a click event for a single offering, pass the offeringContext of the offering. When a user clicks on an Offering, we understand that they are also implicitly clicking on the parent Experience. You can now optionally pass the experienceContext to the offeringClicked function.

What this means

  • If you pass both contexts, MoEngage will automatically track clicks for both the Offering and the Experience. You no longer need to make a second, separate call to track the click event for the parent experience.
  • If you only pass the offeringContext, the experienceContext is optional. If you don’t pass it, we will only track the click for the Offering. You would then need to track the experience click separately, if required.
    <script type="text/javascript">
    Moengage.personalize.offeringClicked(offeringContext,experienceContext)
    </script>