# Monetate

[Monetate](https://monetate.com/) is a personalization platform that allows you to create unique customer experiences. Its state-of-the-art features allow you to increase customer engagement, boost conversion rates, and improve overall sales.

RudderStack allows you to send your event data from your client-side or server-side components to Monetate. This guide will help you set up, configure, and use Monetate for your project.

Find the open source transformer code for this destination in the <a href="https://github.com/rudderlabs/rudder-transformer/tree/main/src/v0/destinations/monetate">GitHub repository</a>.

## Connection compatibility

{{< destination-config >}}

## Get started

Once you have confirmed that the platform supports sending events to Monetate, perform the steps below:

- From your [RudderStack dashboard](https://app.rudderlabs.com/), add the source and select **Monetate** from the list of destinations.
- Name your destination, and click **Next**. You should be able to see the following screen:

{{< image src="images/image (6).webp"  >}}
<span class="imageTitle">Connection Settings for Monetate</span>

- The connection settings are described in more details below:
  - **Monetate Channel** - Enter the name of the Monetate channel you would like to send your events to.
  - **Retailer Short Name** - Your Monetate account's retailer short name goes here.
- After filling in these values, click **Next** to complete the setup. Monetate should now be added and enabled as a destination in RudderStack.

## Track

{{< warning >}}
This destination does not strictly adhere to the [RudderStack Ecommerce Event Spec]({{< ref "event-spec/ecommerce-events-spec/" >}}).
{{< /warning >}}

For each `track` call you make, we send the data to Monetate using Monetate's Engine API.

The table below summarizes the various Monetate events and properties sent by RudderStack:

{{< info >}}

The Monetate event is sent only if the corresponding RudderStack key is present.

{{< /info >}}

| RudderStack Key                         | Monetate Event                | Monetate Event Properties                                                                                        |
| :-------------------------------------- | :---------------------------- | :--------------------------------------------------------------------------------------------------------------- |
| `context.ip`                            | `monetate:context:IpAddress`  | `ipAddress` : `context.ip`                                                                                       |
| `"properties.page"` OR `"context.page"` | `monetate:context:PageView`   | `url`: `page.url`, `path`: `page.path`, `categories`: \[`page.category`\], `breadcrumbs`: \[`page.breadcrumbs`\] |
| `context.referrer.url`                  | `monetate:context:Referrer`   | `referrer`: `context.referrer.url`                                                                               |
| `context.screen`                        | `monetate:context:ScreenSize` | `height`: `context.screen.height`, `width`: `context.screen.width`                                               |
| `context.userAgent`                     | `monetate:context:UserAgent`  | `userAgent` : `context.userAgent`                                                                                |

{{< success >}}

  RudderStack also sends `monetateId` along with the events if you send
  `monetateId` in the event's properties.
{{< /success >}}

RudderStack sends an additional event to Monetate for the following ecommerce events :

| RudderStack Event     | Monetate Event                          |
| :-------------------- | :-------------------------------------- |
| `Product Viewed`      | `monetate:context:ProductDetailView`    |
| `Product List Viewed` | `monetate:context:ProductThumbnailView` |
| `Product Added`       | `monetate:context:Cart`                 |
| `Cart Viewed`         | `monetate:context:Cart`                 |
| `Order Completed`     | `monetate:context:Purchase`             |

The code snippet below shows a sample `track` call :

```javascript
rudderanalytics.track("Form Submitted", {
  plan: "trial",
  country: "UK",
})
```

## Screen

For each `screen` call, RudderStack sends the following events to Monetate:

| RudderStack Key  | Monetate Event                | Monetate Event Properties                                          |
| :--------------- | :---------------------------- | :----------------------------------------------------------------- |
| `context.screen` | `monetate:context:ScreenSize` | `height`: `context.screen.height`, `width`: `context.screen.width` |

{{< info >}}

Note that RudderStack sends the Monetate event only if the corresponding RudderStack key is present.

{{< /info >}}

The code snippet below shows a sample `screen` call :

```objectivec
[[RudderClient sharedInstance] screen:@"Main"
            properties:@{@"prop_key" : @"prop_value"}];
```

## Page

For each `page` call, RudderStack sends the following events to Monetate:

| RudderStack Key                         | Monetate Event              | Monetate Event Properties                                                                                        |
| :-------------------------------------- | :-------------------------- | :--------------------------------------------------------------------------------------------------------------- |
| `"properties.page"` OR `"context.page"` | `monetate:context:PageView` | `url`: `page.url`, `path`: `page.path`, `categories`: \[`page.category`\], `breadcrumbs`: \[`page.breadcrumbs`\] |
| `context.referrer.url`                  | `monetate:context:Referrer` | `referrer`: `context.referrer.url`                                                                               |

{{< info >}}

Note that RudderStack sends the Monetate event only if the corresponding RudderStack key is present.

{{< /info >}}

The code snippet below shows a sample `page` call :

```javascript
rudderanalytics.page("HomePage", {
  path: "/homepage",
  url: "https://example.com/homepage",
})
```



