> 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/measurement-and-attribution/measure-and-optimize/track-your-campaign/goals-and-attribution.md).

# Goals and attribution

Attach goals to a campaign, and choose the attribution model that decides how its conversions are credited.

## Your goal

Credit the conversions your users complete back to the campaign that drove them, so you can report attribution KPIs to your own teams or to a client.

## Expected outcome

One or more goals attached to your tracking campaign, each carrying an attribution model, producing attributed-conversion figures you can read on the campaign or export.

## Why attribution needs a goal

mediarithmics lets you [track a campaign](/measurement-and-attribution/measure-and-optimize/track-your-campaign/campaign-tracking.md), or ingest campaign data by batch, so your CDP holds one view of your activated campaigns and the KPIs that go with them: number of views, number of clicks, and so on.

Delivery is not success. Most sales houses are interested in campaign statistics, but what they most want to give their clients is attribution KPIs, because that is what clients use to judge whether a campaign worked. Defining goals is what lets you measure attribution.

{% hint style="info" %}
A conversion is not a synonym for a campaign exposure. It corresponds to a user matching the actions defined in the goal, whether or not that user saw your campaign.
{% endhint %}

A **goal**, and the two ways to trigger one, are defined in the **Setup & Monitor** section, under *Collect & manage your data > Collect data in real time > Conversions*. What is specific to this page is attaching that goal to a campaign, and the attribution model that decides how much credit the campaign receives.

## The two goal types, in attribution terms

<table data-search="false"><thead><tr><th width="240">Goal trigger type</th><th></th></tr></thead><tbody><tr><td><strong>Trigger via Pixel</strong></td><td>Each time the pixel is triggered, a conversion event is sent to mediarithmics.</td></tr><tr><td><strong>Trigger via Query</strong>, also called <strong>Expert Query Goal</strong></td><td>Each time a user matches the conditions of the query, a conversion event is triggered.</td></tr></tbody></table>

Multiple goals can be attached to one campaign, according to the KPIs that campaign has to be judged on.

{% hint style="info" %}
The query goal is what lets you measure KPIs that are not a simple transaction, and that advertisers and agencies routinely ask for: **brand halo**, or the **ROPO effect** (Research Online, Purchase Offline).
{% endhint %}

## What an attribution model is

An **attribution model** is the setting, created beforehand in your campaign settings, that decides whether and how much credit a conversion gives to the campaign it is attached to. You associate an attribution model with a goal when you create the goal, and it is the attribution model, not the goal on its own, that produces the attributed-conversion figures shown on the campaign.

{% hint style="warning" %}
This page does not list the attribution models available on your organisation, or how each one distributes credit. Those depend on your setup - ask your account manager which models are enabled for you before you attach one to a goal.
{% endhint %}

## Create a goal and attach it to your campaign

{% stepper %}
{% step %}

### Start a new goal

In the Goals section, click **New Goal**, then choose the **Goal trigger type** that fits your use case: **Trigger via Query** or **Expert Query Goal**, or **Trigger via Pixel**.
{% endstep %}

{% step %}

### Name the goal

The goal name is mandatory.
{% endstep %}

{% step %}

### Add a conversion value

Optional, but necessary if you want to measure the turnover attributed to the conversions.
{% endstep %}

{% step %}

### Define the trigger

For a query goal, define the query that will trigger the conversion. For a pixel goal, the code snippet appears once the goal is saved, and you then implement it.

{% hint style="info" %}
Implement a goal pixel where the conversion actually happens: on the **Add to basket** button, the **View basket** button, or the **Confirm transaction** button, for example.
{% endhint %}
{% endstep %}

{% step %}

### Add the attribution model

Add an attribution model previously created in your campaign settings. This is what turns a plain conversion into an attributed one.
{% endstep %}

{% step %}

### Save, then activate the goal

Click **Activate** once the goal is saved.
{% endstep %}

{% step %}

### Attach the goal to your tracking campaign

Edit your [tracked campaign](/measurement-and-attribution/measure-and-optimize/track-your-campaign/campaign-tracking.md). A **Goals** section is visible there, and you attach the goals you just created.
{% endstep %}
{% endstepper %}

{% hint style="warning" %}
Goals must be set up **before the campaign starts**. A goal cannot retroactively attribute conversions that happened before it existed.
{% endhint %}

## Read the results

<table data-search="false"><thead><tr><th width="240">Where</th><th></th></tr></thead><tbody><tr><td><strong>On the campaign</strong></td><td>Go to the campaign you want to analyze and click a specific goal to focus on its attributed conversions. <strong>Export</strong> gives you a report with more granularity, including daily attributed conversions, which is what you want when building a client report.</td></tr><tr><td><strong>In the goals library</strong></td><td>Click the goal you want to analyze.</td></tr></tbody></table>

## 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>Measure attribution</strong></td><td>Choosing between goals, funnels, and replication.</td><td><a href="/measurement-and-attribution/measure-and-optimize/track-your-campaign/measure-attribution.md">Measure attribution</a></td></tr><tr><td><strong>Analyze conversions</strong></td><td>Reading conversion volumes once goals are firing.</td><td><a href="/measurement-and-attribution/measure-and-optimize/analyze-conversions.md">Analyze conversions</a></td></tr><tr><td><strong>Campaign tracking</strong></td><td>The campaign these goals attach to.</td><td><a href="/measurement-and-attribution/measure-and-optimize/track-your-campaign/campaign-tracking.md">Campaign tracking</a></td></tr></tbody></table>

{% hint style="info" %}
What a goal is, and the two ways to trigger one, are defined in the **Setup & Monitor** section, under *Collect & manage your data > Collect data in real time > Conversions*.
{% 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/measurement-and-attribution/measure-and-optimize/track-your-campaign/goals-and-attribution.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.
