# Convertro Destination

## Destination Info

* Accepts [Identify](/docs/segment/connections/spec/identify), [Track](/docs/segment/connections/spec/track) calls.
* Refer to it as **Convertro** in the [Integrations object.](/docs/segment/guides/filtering-data/#filtering-with-the-integrations-object)

### Components

* [Browser](https://github.com/segment-integrations/analytics.js-integration-convertro)
* Server

## Connection Modes

[Learn more about connection modes.](/docs/segment/connections/destinations/#connection-modes)

### Device-Mode

* web: yes
* mobile: no
* server: no

### Cloud-Mode

* web: yes
* mobile: yes
* server: yes

## Getting Started

Our Convertro destination lets you track customer data from either your website data or your mobile data. When you send data using `analytics.js` Segment uses Convertro's JS library to send `.identify()` and `.track()` data.

If you are sending data using our mobile libraries, Segment uses their server to server API to send `.identify()` and `.track()` data.

## Using `analytics.js` Library

### Identify

When you call our identify call we'll call Convertro's `trackUser` method with the `traits` object. If you don't include the first argument in your `identify` call (the `userId`) nothing will be sent to Convertro.

#### Ecommerce

Ecommerce events are sent to Convertro as long as they include an `orderId`.

#### Amount

To record the transaction amount to Convertro we'll pass the `total` from your **Order Completed** event and fall back to `revenue` if there's no `total`.

#### Repeat Purchases

You can also include `properties.repeat` as a boolean if you need to specify between repeat and new purchasers.

With a value of `true` Segment passes `sale.repeat` to Convertro.

If you record `repeat: false` Segment passes `sale.new` to Convertro.

#### Attribution Model

Convertro has two main attribution models.

1. You don't know which users are new or repeat, so you'll just send through **Order Completed** without a `repeat` property and it will get counted as a `sale` event in Convertro.
2. You know which users are new or repeat, and when you pass through the **Order Completed** event with a `repeat` property set to `true` or `false` we'll send through a `sale.repeat` or `sale.new` event to Convertro.

If over the course of your using Convertro, you switch between the first and second attribution model, Segment provide the ability to take advantage of a **hybrid attribution model** that will send both `sale` and `sale.new` or `sale.repeat` when you have a valid `repeat` property on the **Order Completed** event. This is necessary to combine the models and data from your old `sale` event with the new `sale.new` and `sale.repeat` events.

## Using Mobile Libraries

In order for your mobile data to flow to Convertro, you want to first insert your Convertro **Client Name**, **Site ID**, and **Domain** into your destination settings.

**Important**: Convertro requires your **Device ID** for all API calls. Our mobile libraries automatically collect this value from your device so you do not need to worry about it. Just don't overwrite your `context.device.id` property!

## Identify

Convertro only accepts user data that includes a `userId`. Thus Segment rejects any anonymous `.identify()` calls that does not include the `userId`.

Convertro does not accept any user traits — meaning that `.identify()` calls will be used to tie your **Device ID** to the **userId**.

## Track

When you call `.track()`, Segment sends that event to Convertro by setting the `event_type` as the name of your event. If you send a `revenue` property, Segment sends that as the `event_value` (`Order Completed` events will use the `total`). The `event_value` will be sent as `1` if no revenue value is provided.

## Application Installed

We will send this automatically collected [`Application Installed` event](/docs/segment/connections/spec/mobile/) to Convertro's `Installs` endpoint.

## Engage

You can send computed traits and audiences generated using [Engage](/docs/segment/engage) to this destination as a **user property**. To learn more about Engage, schedule a [demo](https://segment.com/contact/demo).

For user-property destinations, an [identify](/docs/segment/connections/spec/identify/) call is sent to the destination for each user being added and removed. The property name is the snake\_cased version of the audience name, with a true/false value to indicate membership. For example, when a user first completes an order in the last 30 days, Engage sends an Identify call with the property `order_completed_last_30days: true`. When the user no longer satisfies this condition (for example, it's been more than 30 days since their last order), Engage sets that value to `false`.

When you first create an audience, Engage sends an Identify call for every user in that audience. Later audience syncs only send updates for users whose membership has changed since the last sync.

> \[!NOTE]
>
> Real-time audience syncs to Convertro  may take six or more hours for the initial sync to complete. Upon completion, a sync frequency of two to three hours is expected.

## Settings

Segment lets you change these destination settings from the Segment app without having to touch any code.

| Field                    | Description                                                                                                                                                                                                                  | Required | Type     |
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------- |
| Account                  | Enter your Convertro Account Name                                                                                                                                                                                            | Yes      | string   |
| Client Name              | If you'd like to send mobile data to Convertro's server side integration, please enter your Convertro Client Name                                                                                                            | No       | string   |
| Domain                   | If you'd like to send mobile data to Convertro's server side integration, please enter your Convertro Domain                                                                                                                 | No       | string   |
| Events                   | Convertro only wants to receive specific events. For each conversion event you want to send to Convertro, put the event name you send to Segment on the left, and the name you want Convertro to receive it as on the right. | No       | text-map |
| Hybrid Attribution Model | This will make \*\*Completed Order\*\* events always send a \`sale\` event in addition to a \`sale.new\` or \`sale.repeat\` event if it has a boolean \`repeat\` property.                                                   | No       | boolean  |
| Site ID                  | If you'd like to send mobile data to Convertro's server side integration, please enter your Convertro Site ID                                                                                                                | No       | string   |
