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

# Opted Out Users

<Info>
  Optional step for data tracking.
</Info>

MoEngage provides you behavioral data only for the users who opt-in for push notifications. If you are trying to optimize the opt-in funnel, and check the exact stats on how many users have agreed/blocked to subscribing push notifications, you will have to track it as part of your existing analytics solution.

To achieve this, we have exposed opt-in callback interaction events that can be listened to so that you can track them using your own analytics flow.

## Hard ask prompted by the Browser

<Frame>
  <img src="https://mintcdn.com/moengage-sdk-docs/pxqgvOOmWRzs8AxB/images/hardaskpromptedbybrowser.png?fit=max&auto=format&n=pxqgvOOmWRzs8AxB&q=85&s=1fc72c5f1a44d57fd8052f352b1d573f" alt="Hardaskpromptedbybrowser" width="748" height="255" data-path="images/hardaskpromptedbybrowser.png" />
</Frame>

## Soft ask prompted by MoEngage

<Frame>
  <img src="https://mintcdn.com/moengage-sdk-docs/pxqgvOOmWRzs8AxB/images/SoftaskpromptedbyMoEngage.png?fit=max&auto=format&n=pxqgvOOmWRzs8AxB&q=85&s=af7fa0f5d1afd8c23ec165ff229ade34" alt="Softaskpromptedby Mo Engage" width="1435" height="350" data-path="images/SoftaskpromptedbyMoEngage.png" />
</Frame>

## Detailed Reference for Opt-in interaction Callbacks

Event listener syntax

<CodeGroup>
  ```JavaScript JavaScript lines theme={"theme":{"light":"github-light","dark":"github-dark"}}
  window.addEventListener("MOE_OPT_IN",function(e){
    //Track events here
  });
  ```
</CodeGroup>

The name of the Event is MOE\_OPT\_IN.

Type of events are:

#### Default opt-in interaction events:

| Event              | Description                                           |
| ------------------ | ----------------------------------------------------- |
| opt\_in\_shown     | Default opt-in shown                                  |
| opt\_in\_allowed   | User clicked ***allow***                              |
| opt\_in\_blocked   | User clicked ***block***                              |
| opt\_in\_dismissed | The user dismissed the opt-in (Closed the dialog box) |

#### Custom opt-in (Soft-Ask) interaction events:

| Event              | Description                     |
| ------------------ | ------------------------------- |
| soft\_ask\_shown   | Custom opt-in shown             |
| soft\_ask\_allowed | User ***accepted*** the opt-in. |
| soft\_ask\_closed  | User ***dismissed*** the opt-in |

For further assistance, please contact your MoEngage Customer Success Manager (CSM) or the Support team.
