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

# Setting up Conversion Tracking

In **Campaigns** > **Conversion Tracking**, create **Goals** to track campaign performance. Goals can track a customer's progress through your site, such as a landing page visit, sign-up, or sale. Choose one tracking method:

* [**Conversion Tracking API - S2S (Recommended)**](/api/conversion-tracking-api.md)
* **Pixel Tracking**

## Step 1: Creating a conversion tracking goal <a href="#step-1-creating-a-conversion-tracking-goal" id="step-1-creating-a-conversion-tracking-goal"></a>

![creating tracking goal](https://2122107279-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FualFKt6C8xdYfe2WEYpJ%2Fuploads%2FJOIrTzO0a2QlAw23tP36%2Fcreate-conversion-tracking-goal.png?alt=media\&token=fa82c130-db9f-4e32-ad25-87625250e64a)

1. In the Admin Panel, click **Campaigns** > **Conversion Tracking**.
2. Click the **NEW CONVERSION GOAL** button.
3. The **New Conversion Goal** form will appear.

## Step 2: Set the name, conversion type, conversion value, and order number <a href="#step-2-set-the-name-conversion-type-conversion-value-and-order-number" id="step-2-set-the-name-conversion-type-conversion-value-and-order-number"></a>

![creating tracking goal](https://2122107279-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FualFKt6C8xdYfe2WEYpJ%2Fuploads%2FSAxkjAU8FzdXs0D6N3SJ%2Fconversion-tracking-example-form-7-2023.png?alt=media\&token=de877b16-8ff5-446a-af3f-0676e1289392)

* Set a recognizable **Name** for the goal.
* Choose a **Conversion Type**. This required field supports Smart Bid pricing algorithms. Choose from:
  * **App Install**
  * **Lead - Double Opt In**
  * **Lead - Single Opt In**
  * **Multiple Conversions Type** - Use this goal for multiple campaigns.
  * **Other**
  * **Purchase - Carrier Billing**
  * **Purchase - COD (Cash on Delivery)**
  * **Purchase - Credit Card**
  * **Subscription - Carrier Billing**
  * **Subscription - Credit Card**
  * **Website Interaction**
* Choose a **Conversion Value**. It determines **Revenue**, **Profit**, and **ROI** for campaigns using this goal. Choose from:
  * **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.
* Choose a **Count** value. It defines how often the same conversion is counted:
  * **One Conversion**: Counts each conversion once.
  * **Every Conversion**: Counts every conversion per ad click.
* Choose a **Conversion Window**. It defines how long after an ad interaction to associate a conversion with the campaign. Available values:
  * 12 hours
  * 24 hours (default)
  * 2 days
  * 3 days
  * 7 days
  * 30 days
  * 90 days
  * Custom: Enter an integer from 1 to 90 days.
* Set the **Order** number. It determines this goal's position among your account goals:
  * An order of `2` corresponds to G2 on the **Statistics** page.
  * Creating four goals with orders 1–4 creates G1–G4.
  * **Statistics** can show **eCPA** (Effective Cost Per Acquisition) for each goal, set to show using the **Goals** section of the table data.
  * If goals share an order, the oldest appears first.

## Step 3: Set the Conversion Value <a href="#step-3-set-the-conversion-value" id="step-3-set-the-conversion-value"></a>

Use **Conversion Value** to set the value of a goal conversion.

For example, if your conversion is setup with a conversion value as **Fixed** and it represents a completed signup to your portal, you would calculate how much money you make on average from a signed-up user, depending on how long they stay signed up, their membership fee, and so on.

This calculation helps you set the maximum acceptable cost per sign-up.

Enter `10.65` in **Fixed Conversion Value** to track conversion spending for this goal.

As mentioned above, when you view the [**Statistics**](/advertisers/advertiser-statistics.md) tab, you will see your goals and their associated eCPA in the table data.

![table](https://2122107279-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FualFKt6C8xdYfe2WEYpJ%2Fuploads%2FBJMMVadsCjwOBGfUI83N%2Ftable-data-goals.png?alt=media\&token=7a0b094a-43df-42bf-bf21-6687b92ef539)

After creating a goal, **Profit** and **Revenue** appear in three colors:

* **Green**: ROI exceeds 0%. You pay less per conversion than your COA.
* **Black**: ROI equals 0%. Review detailed campaign statistics to optimize traffic sources.
* **Red**: ROI is below 0%. You pay more per conversion than your COA. Review traffic sources and campaign settings.

## Step 4: Creating the goal <a href="#step-4-creating-the-goal" id="step-4-creating-the-goal"></a>

Once you have set the **Name**, **Conversion Type**, **Conversion Value**, and **Order** for the goal, click **Create**.

## Step 5: Selecting the conversion tracking method <a href="#step-5-selecting-the-conversion-tracking-method" id="step-5-selecting-the-conversion-tracking-method"></a>

![creating tracking goal](https://2122107279-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FualFKt6C8xdYfe2WEYpJ%2Fuploads%2Fx3t5uTPs4Kq0WvwfWGip%2Fselect-conversion-tracking-method.png?alt=media\&token=194b51e9-a190-4b5d-9ae6-42a08731c78e)

On the **My Goal** screen, select a method from **Select Conversion Tracking Method**:

* **Conversion Tracking API - S2S**: Go to **Step 6**
* **Pixel Tracking**: Go to **Step 7**

## Step 6: Using Conversion Tracking API - S2S (Recommended) <a href="#step-6-using-conversion-tracking-api---s2s-recommended" id="step-6-using-conversion-tracking-api---s2s-recommended"></a>

The request, responses and errors for the Conversion Tracking API are detailed [here](/api/conversion-tracking-api.md).

### Step 6a: Campaign Setup with Conversion Tracking <a href="#step-6a-campaign-setup-with-conversion-tracking" id="step-6a-campaign-setup-with-conversion-tracking"></a>

![creating tracking goal](https://2122107279-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FualFKt6C8xdYfe2WEYpJ%2Fuploads%2FyLsvjCn8S3JEBsTNxJxu%2Fs2s-ad-destination.png?alt=media\&token=c553b2df-3554-40dd-9cdf-768ce2563c12)

Add the `{conversions_tracking}` token to the landing page in [Step 2: **Ads**](/advertisers/campaigns/creating-a-campaign/step-2-ads.md). In **Select Ad Destination**, click **+ADD TOKENS** and choose `{conversions_tracking}`.

### Step 6b: Storing the {conversions\_tracking} token <a href="#step-6b-storing-the-conversions_tracking-token" id="step-6b-storing-the-conversions_tracking-token"></a>

When a customer clicks your ad, the token receives a unique ID. Store this ID for reference when calling the **Conversion Tracking API** to trigger a conversion.

### Step 6c: Triggering a conversion <a href="#step-6c-triggering-a-conversion" id="step-6c-triggering-a-conversion"></a>

When the customer reaches the goal, send a GET request to the URL below. Replace `{conversions_tracking}` with the Step 6b token.

```json
http://syndication.examplesite.com/tag.php?goal=1b9b3786eae526755467c2593d194005&tag={conversions_tracking}
```

### Step 6d: Triggering a conversion when conversion value is set as Dynamic <a href="#step-6d-triggering-a-conversion-when-conversion-value-is-set-as-dynamic" id="step-6d-triggering-a-conversion-when-conversion-value-is-set-as-dynamic"></a>

For dynamic conversion values, add `&value={conversion_value}`. Replace `{conversion_value}` with a monetary amount, such as `123.45`.

```
https://{NETWORK_CONVERSION_URL}/tag.php?goal={GOAL_ID}&tag={conversions_tracking}&value={conversion_value}
```

### Step 6e: Using Dynamic CPA <a href="#step-6e-using-dynamic-cpa" id="step-6e-using-dynamic-cpa"></a>

![copying tracking secret key](https://2122107279-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FualFKt6C8xdYfe2WEYpJ%2Fuploads%2Ffwco3MlCcageUDMln8a3%2Fconversion-tracking-secret-key.png?alt=media\&token=185abe1c-8396-41e9-8c3a-637a24a84162)

If enabled, you can use the pricing model **Dynamic CPA**. This allows you to define the CPA price for a campaign on demand.

Add these values to the URL:

* The secret key at the bottom of **Conversion Tracking**.
* The CPA value to set.

Example:

Secret key=1234567 CPA value=0.1

```json
http://syndication.examplesite.com/tag.php?goal=1b9b3786eae526755467c2593d194005&tag={conversions_tracking}&skey=1234567&cpa=0.1
```

### Postback URL Responses <a href="#postback-url-responses" id="postback-url-responses"></a>

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

<table data-header-hidden data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Response</strong></td><td><strong>Meaning</strong></td></tr><tr><td>OK</td><td>The request is OK. Conversion has been registered</td></tr><tr><td>ERROR: This conversion has already been notified and saved.</td><td>A conversion for this conversions_tracking ID has already been registered and cannot be counted again, and the postbak URL has been called multiple times within the "Conversion Window".This happens only with Conversion Goals that Count "One Conversion".</td></tr><tr><td>ERROR: Tag is invalid!</td><td>The format of the conversions_tracking ID is not correct. Happens when the {conversions_tracking} is missing or does not have all the required characters (min. 150, max. 700).</td></tr><tr><td>ERROR: No tag data.</td><td>The conversion_tracking ID is missing.</td></tr><tr><td>ERROR: Goal ID is invalid.</td><td>The format of the Goal ID is not correct. Goal IDs are 32 characters of hexadecimal (0-9, a-f).</td></tr><tr><td>ERROR: No Goal ID.</td><td>The tag or Goal ID is missing.</td></tr><tr><td>ERROR: Conversion window is not<br>respected.</td><td>The postback URL has been called outside the Conversion Window.</td></tr></tbody></table>

## Step 7: Using Pixel Tracking <a href="#step-7-using-pixel-tracking" id="step-7-using-pixel-tracking"></a>

### Step 7a: Pixel Tracking <a href="#step-7a-pixel-tracking" id="step-7a-pixel-tracking"></a>

Select **Pixel Tracking** from **Select Conversion Tracking Method**. The pixel script appears below.

<figure><img src="https://2122107279-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FualFKt6C8xdYfe2WEYpJ%2Fuploads%2FVw115UC9CvzQeDvTNhbZ%2Fmy-conversion-tracking-pixel.png?alt=media&amp;token=5809ec7c-0022-47c9-ac41-17fe0bab3e54" alt=""><figcaption></figcaption></figure>

```
<!-- START examplesite.com Goal Tag | Test Goal -->
<script type="application/javascript" src="https://ads.examplesite.com/tag_gen.js" data-goal="44521a5f9795760d326a5def51360908"></script>
<!-- END examplesite.com Goal Tag | Test Goal -->
```

Click **Copy**, then paste the script onto the relevant pages of your site.

### Step 7b: Dynamic Conversion Value <a href="#step-7b-dynamic-conversion-value" id="step-7b-dynamic-conversion-value"></a>

For a dynamic conversion value goal, use the **data-value** parameter to provide the monetary value.

<figure><img src="https://2122107279-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FualFKt6C8xdYfe2WEYpJ%2Fuploads%2FW6EA15yoih0CzY7Iocdv%2Fmy-conversion-tracking-pixel-dynamic-goal.png?alt=media&amp;token=98a31acf-2e7f-4517-a517-6ff7d7824811" alt=""><figcaption></figcaption></figure>

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

Click **Copy**, then paste the script onto the relevant pages of your site.


---

# 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.exads.com/advertisers/campaigns/conversion-tracking/setting-up-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.
