> ## 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.

# Personalize API Experience events tracking

This document outlines the new methods available in the MoEngage Personalize SDK to report impressions and clicks for API experiences created via the [MoEngage Personalize API](https://www.moengage.com/docs/api/personalize-experience/personalize-overview). 

# Pre-Requisites

## SDK Integration

1. Refer to [this article](/developer-guide/web-sdk/web-sdk-integration/basic-integration/web-sdk-integration) to integrate the Web SDK on your website.
2. Refer to [this article](/developer-guide/personalize-sdk/sdk-integration/web-personalization-v2) to integrate the Personalize SDK on your website.

## MoEngage Account Configuration

Ensure your MoEngage workspace is enabled to utilize Personalize. Refer to [this article](https://help.moengage.com/hc/en-us/articles/24644175705236-Create-Server-side-Personalization-Experience) for details on setting up a Personalize API experience.

# Reporting Experience Shown events

The SDK provides a method to track experience shown events. To report an impression for an experience, use the below SDK method.

<CodeGroup>
  ```javascript Javascript wrap theme={"theme":{"light":"github-light","dark":"github-dark"}}
  <script type="text/javascript">
  MoEngage.personalize.trackImpression(experienceContext)
  </script>
  ```
</CodeGroup>

**experienceContext** is a JSON object that is returned in the Response to the Personalize API experience Fetch call. More details [here](https://www.moengage.com/docs/api/experiences/fetch-experience#response-experiences). 

# Reporting Experience Clicked events

The SDK provides a method to track experience clicked events. To report an click for an experience, use the below SDK method.

<CodeGroup>
  ```javascript Javascript wrap theme={"theme":{"light":"github-light","dark":"github-dark"}}
  <script type="text/javascript">
  MoEngage.personalize.trackClick(experienceContext,extraAttributes)
  </script>
  ```
</CodeGroup>

**extraAttributes** is a **optional** JSON object in which you can pass additional information about the link or the CTA which the user has interacted with.

<CodeGroup>
  ```json JSON wrap theme={"theme":{"light":"github-light","dark":"github-dark"}}
  {
    "button_id": "<submit-form-btn>",
    "button_name": "<Add to Cart>",
    "button_type": "<primary>",
  }
  ```
</CodeGroup>

The example JSON provided above illustrates sample values designed to give you a clear understanding of the types of data you can include when tracking additional information about clicks. Feel free to adapt these values to suit your specific implementation needs.
