> For the complete documentation index, see [llms.txt](https://docs.mediarithmics.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mediarithmics.io/setup-and-monitor/collect-and-manage-your-data/collect-data-in-real-time/conversions.md).

# Conversions

Define a goal so the platform records when a user converts.

## Your goal

Record when a user converts, so you can measure and optimise the performance - the cost per action - of your marketing campaigns.

## Expected outcome

A goal that fires reliably at the moment of conversion, attached to the attribution model you want to use.

## What a goal is

On the platform you create a **goal** to define the trigger for **when a user should convert**. There are two ways to configure one, and the choice is a trade-off between simplicity and flexibility.

{% columns %}
{% column %}

### Trigger via pixel

Every user who sees the pixel on a page converts for that goal. The pixel goes on the confirmation page, or is loaded dynamically when the user converts - through a tag manager, or by including the pixel load in the site's logic.

**The simplest solution to configure.** Use it for non-recurrent conversion tracking.
{% endcolumn %}

{% column %}

### Trigger via query

A rule runs on the datamart data and generates a user conversion each time a user matches it.

**More flexible, longer and more complex to configure.**
{% endcolumn %}
{% endcolumns %}

Use the query option when:

* The tracking tags or pixels are already present on the website, including on the page where the conversion happens.
* The goal will be used repeatedly.
* The goal definition requires a complex rule that cannot be achieved by displaying a tag or a pixel.

{% hint style="info" %}
Query-based conversions are detected at **step 4** of the [processing pipeline](/setup-and-monitor/collect-and-manage-your-data/collect-data-in-real-time.md#the-processing-pipeline). Conversions relying on pixels skip that step, which is part of why they behave more predictably.
{% endhint %}

## Create a goal

{% tabs %}
{% tab title="Via pixel" %}
In the Navigator, under the **Campaigns** tab and the **Goals** sub-tab:

{% stepper %}
{% step %}

### Name the goal

{% endstep %}

{% step %}

### Select Trigger via Pixel

{% endstep %}

{% step %}

### Hand the generated HTML to your technical team

They integrate it on the confirmation page, or load it when the conversion happens.
{% endstep %}

{% step %}

### Associate the attribution model

Do not skip this - it is what attributes the conversion to your marketing campaigns. Attaching an attribution model to a campaign goal is documented in the **Measurement & Attribution** section, under *Measure & optimize › Track your campaign › Goals and attribution*.
{% endstep %}

{% step %}

### Save the goal

{% endstep %}
{% endstepper %}
{% endtab %}

{% tab title="Via query" %}
In the Navigator, under the **Campaigns** tab and the **Goals** sub-tab:

{% stepper %}
{% step %}

### Name the goal

{% endstep %}

{% step %}

### Select Trigger via Query

{% endstep %}

{% step %}

### Define the query

The query decides whether a user has converted. See [Query your datamart](/setup-and-monitor/operate-and-monitor/query-your-datamart.md) for the query languages available.
{% endstep %}

{% step %}

### Associate the attribution model

{% endstep %}

{% step %}

### Save the goal

{% endstep %}
{% endstepper %}

{% hint style="info" %}
If you have trouble defining the query for a goal, fall back to the pixel option or reach out to your account manager.
{% endhint %}
{% endtab %}
{% endtabs %}

## The `$conversion` event

A conversion appears in the data as the predefined event `$conversion`. It is either registered by the integrator, or created automatically by the platform when a goal is met. See [Standard events](/setup-and-monitor/collect-and-manage-your-data/design-your-data-model-and-schema/standard-events.md).

{% hint style="info" %}
For e-commerce, `$transaction_confirmed` is what feeds conversion amounts and funnel analytics. A goal and a transaction event answer different questions - a goal marks that an objective was met and can be attributed to a campaign, while `$transaction_confirmed` carries the products and amounts.
{% endhint %}

## Verify

* A test conversion produces a `$conversion` event on the user's timeline.
* The conversion is attributed to the expected campaign, given the attribution model you selected.
* Pixel-based goals fire exactly once per conversion - check that the pixel is not loaded twice on the confirmation page.

## Related pages

<table data-view="cards" data-search="false"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Ads exposure tracking</strong></td><td>The exposure a conversion is attributed to.</td><td><a href="/setup-and-monitor/collect-and-manage-your-data/collect-data-in-real-time/ads-exposure-tracking.md">Ads exposure tracking</a></td></tr><tr><td><strong>Standard events</strong></td><td><code>$conversion</code> and <code>$transaction_confirmed</code>.</td><td><a href="/setup-and-monitor/collect-and-manage-your-data/design-your-data-model-and-schema/standard-events.md">Standard events</a></td></tr><tr><td><strong>Activities analytics</strong></td><td>What the platform computes from conversions.</td><td><a href="/setup-and-monitor/collect-and-manage-your-data/collect-data-in-real-time/activities-analytics.md">Activities analytics</a></td></tr></tbody></table>

{% hint style="info" %}
Attaching an attribution model to a campaign goal, and reading the attributed conversions it produces, is documented in the **Measurement & Attribution** section, under *Measure & optimize › Track your campaign › Goals and attribution*.
{% endhint %}


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.mediarithmics.io/setup-and-monitor/collect-and-manage-your-data/collect-data-in-real-time/conversions.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
