# mFilterIt iOS EventTracking

## Getting Started

Integrating the mFilterIt Event Tracking solution into an app includes framework integration and sharing event details with the framework.

## Event Tracking Integration

The  integration of this feature can be done by following below steps:

**Step 1** : Integrate the mFilterIt iOS framework.

**Step 2** : Pass event details using this method:

```objectivec
[[MFAnalytics sharedAnalytics] track:EventType

                              properties:eventArray];
```

| Parameter  | Description                                                                                                                                                                                                                                       |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| eventArray | <p>A JSON string that captures the array of events to be sent.</p><p></p><p> For example the below string sends two events called event1 and event2, with values value1 and value2     </p><p>@{ @"event1": @"value1", @"event2": @"value2" }</p> |
| eventType  | String which can have event-types as, for example: ReferralEvent                                                                                                                                                                                  |

#### Example :&#x20;

```objectivec
[[MFAnalytics sharedAnalytics] track:@"ReferralEvent"

                              properties:{ @"event1": @"value1", @"event2": @"value2" }];
```

**Note:** For following events, one should follow an specific convention:&#x20;

**ReferralEvent:** This event is meant for realtime fraud detection and removal of bad traffic for referral events. eventType should be written as- ReferralEvent. s2s event will be triggered for fraud information to be sent on configured url.                                                                                            &#x20;

**S2S integration for passing fraud information:**

mFilterIt supports a real time interface for passing fraud information back to the client’s backend to allow quick decision making for business aspects. The interface supported is a HTTPS GET URL which triggers the Client endpoint with the relevant information.&#x20;

The fields supported are :                                                                                    -Fraud Category                                                                                                   -Fraud Risk Score                                                                                              -Event TransactionID                                                                                              -Device\_Id                                                                                                           -Phone Number                                                                                                 -Email ID                                                                                                               -mfilterIt Event ID                                                                                                                -Registration ID                                                                                                                               -Optional\_1&#x20;

The client needs to provide the endpoint on which mFilterIt will trigger the S2S hit. It is recommended to whitelist certain IP ranges of mFilterIt to prevent malicious hits to this endpoint.

**Step 4** : The below import statement needs to be added to the corresponding files (if needed).

`#import <Mfilterit/Mfilterit.h>`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mfilterit.com/mfilterit-sdk/mfilterit-ios-eventtracking.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
