> For the complete documentation index, see [llms.txt](https://docs.exoclick.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.exoclick.com/advertisers/conversion-tracking/conversion-tracking.md).

# Conversion Tracking

<figure><img src="/files/Z2xdiqJ4XXHXM6IZSOxO" alt=""><figcaption></figcaption></figure>

In the **Campaigns** > **Conversion Tracking** tab, you can create **Conversion Goals** to track the performance of your campaigns. These goals allow you to track your customer's progress and actions through your funnel (e.g. reaching a landing page, sign-up, sale).

Before choosing a conversion tracking method, make sure to **create a Conversion Goal first**. The steps to create a Conversion Goal are the same for both methods.

## Creating a Conversion Goal

In the Conversion Tracking tab, click on the **New Conversion Goal** button. The form to create a new conversion contains the following:

<figure><img src="/files/Sw2tiQalZPOSfe3andCW" alt=""><figcaption></figcaption></figure>

* **Name:** The name of the conversion goal.
* **Conversion type (compulsory):** The type of offer you are promoting. You can choose from the following options:
  * **App Install**
  * **Lead - Single Opt In**
  * **Lead - Double Opt In**
  * **Multiple Conversions Types** - Use this option if you plan to use the same goal for multiple offers.
  * **Subscription - Carrier Billing**
  * **Subscription - Credit Card**
  * **Purchase - Carrier Billing**
  * **Purchase - Credit Card**
  * **Purchase - COD (Cash On Delivery)**
  * **Website Interaction**
  * **Other**
* **Conversion Value:** The payout of the conversion. Used to determine the **Revenue**, **Profit** and **ROI** (Return on Investment) of the campaigns that use this goal in their funnel. You can choose from the following options:
  * **No Value** No amount will be associated with the goal when logged.
  * **Fixed:** A fixed amount provided by you will be associated with the goal when logged.
  * **Dynamic:** A dynamic amount will be associated with the goal when logged.
* **Count:** How many times the same conversion can be counted in your statistics. You can choose between two options:
  * **One conversion:** Conversions are unique and can be called only once.
  * **Every conversion:** Every conversion will be counted if called multiple times.
* **Conversion Window:** The amount of time after an ad interaction during which a conversion will still be associated to that campaign. The available values in the dropdown are:
  * 12 hours
  * 24 hours **(default)**
  * 2 days
  * 3 days
  * 7 days
  * 30 days
  * 90 days
  * Custom (Accepting integers from 1 to 90 days)
* **Order:** The place in which this goal's results will be displayed in regards to the other goals in your account. For example, if you set the order as 2, this Conversion Goal will be displayed second (from left to right) in the **Conversions Panel** from your [**Campaigns List**](/advertisers/campaigns/campaigns-list.md#column-settings) and your [**Statistics**](/advertisers/advertiser-statistics.md#the-conversion-tracking-and-conversion-goals-panels).

**Note:** If you set up multiple goals with the same Order, **the oldest goal** will be placed first in the order of statistics (from left to right).

Once you have selected all the settings for this Conversion Goal, click **Create**. Every Conversion Goal you create in your account has a unique **ID** which will be used to associate the user action to the corresponding Goal.

After creating the goal, you will be able to choose the Conversion tracking method you wish to use for this goal. We offer two ways of conversion tracking:

* [**Conversion Tracking API - S2S (Recommended)**](/advertisers/conversion-tracking/conversion-tracking.md#using-conversion-tracking-api---s2s-recommended)
* [**Pixel Tracking**](/advertisers/conversion-tracking/conversion-tracking.md#using-pixel-tracking)

### Important Update on Conversion Tracking

{% hint style="warning" %}
The domain used for postback URLs has changed to **s.magsrv.com**

Please make sure your tracking is set up accordingly to ensure seamless operation.
{% endhint %}

## Using Conversion Tracking API - S2S (Recommended)

<figure><img src="/files/izXCRGytzJLmYRV0MgEy" alt=""><figcaption></figcaption></figure>

The recommended option for conversion tracking. Used to notify ExoClick's servers from your tracking solution or affiliate platform whenever a conversion is made.

Under the **Tracking Manuals** section, in the sidebar from this documentation, you will find the steps to set up Server to Server tracking with some of the most common tracking software tools in the industry. If your tool is not in this list or you are using a custom solution, please follow the steps below:

{% stepper %}
{% step %}

### Adding the {conversions\_tracking} token to your Campaign URL

In order to notify the conversion to our server, you will need to get the **{conversions\_tracking}** string from your campaign (often known as **Click ID** or **External ID**). To do this, access your campaign settings and, in the **Step 2 - Ads** page of your campaign, click the **+Add Tokens** button next to your campaign URL:

<figure><img src="/files/1sPNk7pODfZsiecOlyGf" alt=""><figcaption></figcaption></figure>

From there, select **{conversions\_tracking}**. Your landing page should look like the following:

```json
http://www.yoursite.com/?lng=FR&exotracker={conversions_tracking}
```

**Note:** Make sure to preceed this token with the **appropriate parameter to identify Click IDs or External IDs**. In this example, we used the parameter `exotracker` as an example. The real parameter you must use to define {conversions\_tracking} will depend on your server or the tracking solution you have.

When a customer clicks on your ad, we will populate this conversion tracking token with a unique ID. You will need to store this ID for reference when calling the **Postback URL**. Here is how the unique ID looks like:

```json
ooddNHNPXHRbHNNU7TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZXQsIGNvbnNlY3RldHVyIGFkaXBpc2NpbmcgZWxpdC4gVml2YW11cyBub24gb2RpbyBtYXNzYS4gRG9uZWMgZGlnbmlzc2ltIGJsYW5kaXQgdmVsaXQgYXQgZWdlc3Rhcy4=
```

**Note:** the unique ID from {conversions\_tracking} has a minimum length of **150 characters** and a maximum of **700 characters**. Make sure you are able to receive and return the complete string.
{% endstep %}

{% step %}

### Calling the Postback URL

You can get the **Postback URL** from your Conversion Goal in the **Conversions tracking** tab from the Admin Panel, after choosing **Conversion Tracking API - S2S** as your tracking method. Our Postback URL has the following structure:

```json
http://s.magsrv.com/tag.php?goal=GOAL_ID&tag=XXXXXXXXXXX
```

When a user in your funnel generates a conversion, your server will have to perform a **HTTP GET call** to this Postback URL. Make sure that you replace the `XXXXXXXXX` value with the **unique ID generated by the {conversions\_tracking} token in your campaign** every time a new conversion is generated in your offer.

If your Conversion Goal has **Dynamic value**, make sure to add **\&value=YYYYYYY** to your Postback URL, where `YYYYYYY` is the **monetary value** of your offer. If you are promoting an **affiliate offer**, please double-check with them what token you should use to pass payouts.

```json
http://s.magsrv.com/tag.php?goal=GOAL_ID&tag=XXXXXXXXX&value=YYYYYYYYYY
```

### Postback URL responses

When your server calls our Postback URL, it can get one of the following responses:

| **Response**                                                | **Meaning**                                                                                                                                                                  |
| ----------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| OK                                                          | The request is OK. Conversion has been registered                                                                                                                            |
| ERROR: This conversion has already been notified and saved. | A conversion for this conversions\_tracking ID has already been registered and cannot be counted again. This happens only with Conversion Goals that Count "One Conversion". |
| ERROR: Tag is invalid!                                      | The format of the conversions\_tracking ID is not correct.                                                                                                                   |
| ERROR: No tag data.                                         | The conversion\_tracking ID is missing.                                                                                                                                      |
| ERROR: Goal ID is invalid.                                  | The format of the Goal ID is not correct. Goal IDs are 32 characters of hexadecimal (0-9, a-f).                                                                              |
| ERROR: No Goal ID.                                          | The tag or Goal ID is missing.                                                                                                                                               |
| ERROR: Conversion window is not respected.                  | The postback URL has been called outside the Conversion Window.                                                                                                              |

Here are some example error Postbacks:

* ERROR: Tag is invalid!

```
http://s.magsrv.com/tag.php?goal=1b9b3786eae526755467c2593d194005&tag=ooddNHNPXHRbHNNU7
```

* ERROR: No tag data.

```
http://s.magsrv.com/tag.php?goal=1a76578475674857&tag=
```

* ERROR: Goal ID is invalid.

```
http://s.magsrv.com/tag.php?goal=4564&tag={conversions_tracking}
```

* ERROR: No Goal ID.

```
http://s.magsrv.com/tag.php?goal=&tag={conversions_tracking}
```

{% endstep %}
{% endstepper %}

## Using Pixel Tracking

<figure><img src="/files/55L4TcwprQD7lqqQJiuj" alt=""><figcaption></figcaption></figure>

If you select **Pixel tracking** as your tracking method, you will get a pixel tracking script which you can copy-paste in the website you want to track. Our pixel tracking script looks like the following:

```html
<!-- START Goal Tag | Test Goal -->
<script type="application/javascript" src="https://a.magsrv.com/tag_gen.js" data-goal="XXXXXXXXXXXXXXXXX"></script>
<!-- END Goal Tag | Test Goal -->
```

If the Conversion Goal has **Dynamic value** then you will see an extra parameter as **data-value** in order to provide the dynamic monetary value:

<figure><img src="/files/2PvHzLCvxvujr91fmWM9" alt=""><figcaption></figcaption></figure>

```html
<!-- START ExoClick Goal Tag | dynamic goal -->
<script type="application/javascript" src="https://a.magsrv.com/tag_gen.js" data-goal="XXXXXXXXXXXXXXXXXXXXX" data-value="{conversion_value}"></script>
<!-- END ExoClick Goal Tag | dynamic goal -->
```

Click **Copy** to copy this script, so you can paste it onto the relevant pages on your site. Make sure to paste the code in the \<body> tag of your site.

For best results, consider creating multiple Pixel goals so as to track the various steps of your campaign funnel. Here is an example set up you can try:

* Pixel n°1 on your **main landing page**.
* Pixel n°2 on your **product checkout** page.
* Pixel n°3 on the "**thank you" page** after the purchase has been made.

### Insights regarding pixel tracking and type-in traffic from video campaigns

Currently, the In-Stream video ads support better conversion tracking by using a tracking pixel because it allows tracking **type-in**\* traffic. **Type-in** traffic is traffic generated by a visitor when they type your brand or site name on their browser and they end up visiting your website. When a user watches the video advert for at least **10 seconds** (which is the minimum amount of time to generate a video view), we drop a cookie that will allow your campaign to identify the user, should he/she visit the URL that contains the tracking pixel.

Therefore, **the tracking pixel should always be present on the targeted page**, not only to identify users coming from ExoClick traffic but also traffic coming from other sources. This allows for a conversion to be tracked even when a visitor manually visits your promoted page shortly after seeing the ad, without actually clicking on this advert directly.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.exoclick.com/advertisers/conversion-tracking/conversion-tracking.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
