> ## Documentation Index
> Fetch the complete documentation index at: https://moengage.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Offerings Events Tracking

> Report impression and click events for offerings from the MoEngage Personalize API in your iOS app.

This document outlines the new methods available in the MoEngage iOS SDK to report impressions and clicks for offerings fetched using the [MoEngage Personalize API](https://www.moengage.com/docs/api/experiences/fetch-experience). These methods are currently available only for the **iOS SDK**.

# Prerequisites

## SDK version

<Note>
  You must update your Native iOS SDK version to **10.01.0** or higher.
</Note>

## MoEngage Account Configuration

Ensure your MoEngage workspace is enabled to utilize the Personalize API. Refer to [this article](https://www.moengage.com/docs/user-guide/personalize/server-side-personalization/create-server-side-personalization-experience) for details on setting up Personalize API offerings.

# Reporting offering Shown events

The SDK provides helper APIs to track shown events, refer the [API documentation](https://moengage.github.io/ios-api-reference/Classes/MoEngageSDKAppPersonalization.html) for more details.

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

## Single offering

To report an impression for a single offering, pass the **offeringContext** as a map.

<CodeGroup>
  ```swift Swift wrap theme={null}
  MoEngageSDKAppPersonalization.sharedInstance.offeringShown(offeringAttributes: offeringContext)
  ```

  ```objective-c Objective C wrap theme={null}
  [[MoEngageSDKAppPersonalization sharedInstance] offeringShownWithofferingAttributes:offeringContext];
  ```
</CodeGroup>

## Multiple offerings

To track the offering shown event for multiple offerings use, pass the **list** of **offering\_context** of each offering as a map.

<CodeGroup>
  ```swift Swift wrap theme={null}
  MoEngageSDKAppPersonalization.sharedInstance.offeringShown(offeringAttributes: [offeringContext1, offeringContext2, offeringContext3])
  ```

  ```objective-c Objective C wrap theme={null}
  [[MoEngageSDKAppPersonalization sharedInstance] offeringShownWithofferingAttributes:@[offeringContext1, offeringContext2, offeringContext3]];
  ```
</CodeGroup>

# Reporting offering Clicked events

The SDK provides helper APIs to track clicked events, refer the [API documentation](https://moengage.github.io/ios-api-reference/Classes/MoEngageSDKPersonalize.html#/c:@M@MoEngagePersonalization@objc\(cs\)MoEngageSDKPersonalize\(im\)trackOfferingClickedWithCampaign:offeringAttributes:workspaceId:) for more details.

Clicked events should be reported when a user clicks on any offering contained in the response of the Personalize API.

## Single offering

To report a click event for a single offering, pass the **offeringContext** of the experience as a map.

<CodeGroup>
  ```swift Swift wrap theme={null}
  MoEngageSDKAppPersonalization.sharedInstance.offeringClicked(offeringAttributes: offeringAttributes, withExperienceAttributes: experienceAttributes)
  ```

  ```objective-c Objective C wrap theme={null}
  [[MoEngageSDKAppPersonalization sharedInstance] offeringClickedWithofferingAttribute:offeringContext];
  ```
</CodeGroup>

## Multiple offerings

To track the offering clicked event for multiple experiences, pass the **list** of **offeringContext** as a map.

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 as a map. 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.

  <CodeGroup>
    ```swift Swift wrap theme={null}
    MoEngageSDKAppPersonalization.sharedInstance.offeringClicked(offeringAttributes: [offeringContext1, offeringContext2, offeringContext3])
    ```

    ```objective-c Objective C wrap theme={null}
    [[MoEngageSDKAppPersonalization sharedInstance] offeringClickedWithofferingAttributes:@[offeringContext1, offeringContext2, offeringContext3]];
    ```
  </CodeGroup>
