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

# How to Implement Conversion Tracking

*Availability: DSP accounts and PE Enterprise accounts*

## Overview

This guide explains how to set up conversion tracking within the Gamoshi Dashboard, allowing you to track and analyze conversion events. Several methods are available, depending on the activity type (app or web) and whether you use an external tracking provider.

***

## Supported Conversion Types

* **Script** – Web conversions only.
* **Pixel** – Available for both web and app conversions.

### Client, Script-Based Web Conversion Tracking

For web-based conversions, you can provide the advertiser with a conversion script to track events directly on the client side, bypassing the need for an external provider.

#### Direct Integration (Gamoshi Script)

* The Gamoshi script is embedded directly into the webpage.
* It listens for relevant events in real time and triggers conversion tracking immediately.

#### External Event Trigger (via Third-Party Manager)

* The advertiser uses a third-party event management tool (e.g., Google Tag Manager).
* The external system detects the event and triggers the Gamoshi script accordingly.

### Server-to-Server – Pixel-Based Conversion Tracking

* Suitable when the advertiser relies on an external measurement provider.
* Gamoshi supplies a pixel that is triggered when the conversion event occurs.
* Pixel deployment is server-side and depends on the provider's specifications and integration requirements.

***

## Setting Up Conversions and Goals in the Conversions Screen

In the **Advertisers Module → Conversions** screen, you can define conversions and set specific conversion goals for both app and web activities. This screen supports more complex tracking scenarios by enabling multiple goals per conversion.

{% tabs %}
{% tab title="App Conversions" %}
{% stepper %}
{% step %}

### Define a Conversion

1. Name the conversion, select **App** in the "Conversion Type" dropdown, choose the relevant advertiser, and enter the Target URL.
2. Optionally, choose a specific third-party provider as a template (e.g., AppsFlyer); the template's specific fields will then be presented.
3. Click **Create Conversion**.

{% hint style="info" %}
The Target URL is the default for all of the advertiser's creatives associated with the conversion. You can override it at the creative level.
{% endhint %}
{% endstep %}

{% step %}

### Set Conversion Goals

Create goals based on the events you wish to track.
{% endstep %}

{% step %}

### Generate and Share Pixel URLs

For each goal, copy the Pixel URL and share it with the advertiser so they can implement it within their tracking system. You can also use the **"Copy All Goals Pixels"** icon to copy all pixels together.
{% endstep %}
{% endstepper %}
{% endtab %}

{% tab title="Web Conversions" %}
{% stepper %}
{% step %}

### Define a Conversion

1. Name the conversion, select **Web** in the "Conversion Type" dropdown, and enter the conversion domain URL and Target URL.
2. Choose one of two integration Pixel Types:

#### Client (Browser) Pixel

* Use this when the conversion is triggered directly by the user's browser.
* If the Gamoshi script should handle events on the webpage, activate the **"Listen On Events"** switch. If not (e.g., using an external provider or Google Tag Manager), deactivate it.
* If "Listen On Events" is active, populate the **"CSS Selector"** field in the goal if a specific button needs to trigger the event.

#### Server-to-Server (S2S) / Server Pixel

* Preferred to avoid issues with browser ad blockers.
* Selecting this mode displays server-side integration documentation and the specific goal pixels your backend needs to communicate with the platform.
* Use the Download/Preview icons to view or download the server-side documentation.
  {% endstep %}

{% step %}

### Set Conversion Goals

Add goals based on the desired conversion events.
{% endstep %}

{% step %}

### Provide Tracking Options

* **If using an external provider:** Copy each goal's Pixel URL to provide to the partner for implementation.
* **If not using an external provider:** In the conversion record's Actions column, select **"Copy Script for Web."** Place this script on the advertiser's conversion page.
* To trigger events manually, you can also share individual Pixel URLs or scripts for each goal.
* You can generate a full integration package — including the conversion script and all relevant pixels — by clicking the **"Generate Integration"** icon on the Goals grid table.
  {% endstep %}
  {% endstepper %}
  {% endtab %}
  {% endtabs %}

***

## Conversion Tracking Examples

### Web Conversion Script Example

```html
<script>

window.g_conversion_tracking = {

 id: 95,

 uuid: '20d905f5-9b19-4f34-b579-6b57e14a0f67',

 bidder_host: '331.bidder.gamx.io'

};

</script>

<script src="https://331.bidder.gamx.io/static/web_conv.min.js"></script>
```

### Web Goal Script Example

```html
<!--

 Goal Tracking Script

 ------------------------------------

 Goal: email now (ID: 87, Type: ClickToAction)

 Conversion Tracking: gfgft (ID: 62)

 ------------------------------------

-->

<script>

 // Trigger the goal tracking function

 window.fireOnGoal(87);

</script>
```

### Optional Parameters

The `window.fireOnGoal` method can accept optional parameters:

1. **Conversion Value** (decimal) – the monetary value of the conversion, in dollars.
2. **Conversion Order ID** (string) – a unique identifier for the order or event.
3. **Conversion External User ID** (string) – an identifier for another global user ID.

Including these parameters lets you track and analyze conversions in the analytics dashboard.

**Example usage** — tracking a conversion with a price of $1.40, an order ID of order-1234, and an external user ID:

```javascript
window.fireOnGoal(87, 1.4, 'order-1234', 'external-user-id');
```

**Example** — with revenue and order ID only:

```javascript
window.fireOnGoal(42, 2.3, 'order_1234');

// Here, 2.3 is the revenue, and 'order_1234' is the order ID.
```

### Example of a Pixel URL

```
https://rtb.bidder.com/conversion/pixel/e92ce6c4-94f0-4fa9-a1fb-6e1f2a5d8593/87/1743505000126/im.gif?gam_pb=\[POST_BACK_DATA\]
```

***

## Associating a Conversion with a Creative

{% stepper %}
{% step %}
Open the relevant creative in **Edit** mode.
{% endstep %}

{% step %}
Open the **"Conversion & Tracking"** section and choose the relevant conversion.

{% hint style="info" %}
You must select an advertiser for the creative before selecting a conversion; once selected, only that advertiser's relevant conversions will appear in the conversions select box.
{% endhint %}
{% endstep %}

{% step %}
Deactivating the **"Use Conversion Tracking URL"** switch lets you skip the conversion's target URL and instead enter a specific Target URL for the creative.
{% endstep %}

{% step %}
Click **Update**.
{% endstep %}
{% endstepper %}

***

## Related articles

* [How to set up Client-Side Web Conversion Tracking (No GTM Method)](/gamoshi-wiki/how-to-guides/how-to-setup-client-side-web-conversion-tracking-no-gtm-method.md)
* [How to Set Up Postback Conversion Tracking](/gamoshi-wiki/how-to-guides/postback-conversion-tracking.md)
* [How to integrate AppsFlyer for Gamoshi DSP](/gamoshi-wiki/how-to-guides/how-to-integrate-appsflyer-for-gamoshi-dsp.md)
* [How to Implement Third-Party Pixel Tracking](/gamoshi-wiki/how-to-guides/how-to-implement-third-party-pixel-tracking.md)
