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

# Offerings Events Tracking

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://help.moengage.com/hc/en-us/articles/24644175705236-Create-Server-side-Personalization-offering) 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={"theme":{"light":"github-light","dark":"github-dark"}}
  MoEngageSDKAppPersonalization.sharedInstance.offeringShown(offeringAttributes: offeringContext)
  ```

  ```objective-c Objective C wrap theme={"theme":{"light":"github-light","dark":"github-dark"}}
  [[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={"theme":{"light":"github-light","dark":"github-dark"}}
  MoEngageSDKAppPersonalization.sharedInstance.offeringShown(offeringAttributes: [offeringContext1, offeringContext2, offeringContext3])
  ```

  ```objective-c Objective C wrap theme={"theme":{"light":"github-light","dark":"github-dark"}}
  [[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/android-api-reference/campaigns-core/com.moengage.campaigns.personalize/-mo-e-personalize-helper/index.html) 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={"theme":{"light":"github-light","dark":"github-dark"}}
  MoEngageSDKAppPersonalization.sharedInstance.offeringClicked(offeringAttributes: offeringAttributes, withExperienceAttributes: experienceAttributes)
  ```

  ```objective-c Objective C wrap theme={"theme":{"light":"github-light","dark":"github-dark"}}
  [[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={"theme":{"light":"github-light","dark":"github-dark"}}
    MoEngageSDKAppPersonalization.sharedInstance.offeringClicked(offeringAttributes: [offeringContext1, offeringContext2, offeringContext3])
    ```

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