> 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/audience-and-activation/target-contextually/contextual-reference.md).

# Contextual reference

What contextual targeting is on this platform, the two solutions available, and how they relate to audience work.

## What contextual targeting is

**Contextual targeting** is the practice of pairing advertisements with relevant media, based on the content of the media web pages rather than on who the user is.

It is an old practice that became less common as behavioural targeting matured, and that has returned to the front of digital media as third-party cookies decline and natural language processing and machine learning have improved.

{% hint style="info" %}
Contextual targeting does not usually require consent - but there are exceptions, such as Google, which requires consent to perform contextual targeting. No data from users who have not given consent is stored or used by this feature. Contact your Account manager for details on how this works in your setup.
{% endhint %}

{% hint style="warning" %}
The contextual module is not enabled by default. Get in touch with your Account manager to enable it.
{% endhint %}

## The two solutions

Both solutions build a **list of URLs** to target, and both lean on the same semantic analysis engine. What differs is where the list comes from.

<table data-search="false"><thead><tr><th width="150">Solution</th><th>How the list is built</th><th>Use it when</th></tr></thead><tbody><tr><td><a href="/audience-and-activation/target-contextually/contextual-reference/semantic-targeting.md"><strong>Semantic</strong></a></td><td>By selecting and excluding entities, IAB categories, and raw keywords.</td><td>You know the context you want to target - for example all content related to a particular sport.</td></tr><tr><td><a href="/audience-and-activation/target-contextually/contextual-reference/panel-based-targeting.md"><strong>Panel-based</strong></a></td><td>By analysing the content consumed by a specific seed audience.</td><td>You do <strong>not</strong> know the context you want to target, but you have a typical segment of profiles you would like to address.</td></tr></tbody></table>

{% hint style="info" %}
Read the choice as a question about your knowledge, not about the technology: semantic starts from the content you can name, panel-based starts from the people you can name and lets the platform find the content.
{% endhint %}

## Where the pieces live

```
Content ingested  →  Semantic analysis  →  Targeting list  →  Activation
                                       ↘  Audience segment criteria
```

| Object               | What it is                                                                                        | Page                                                                                                                         |
| -------------------- | ------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| **Targeting list**   | The set of URLs produced by either solution, and the object you activate.                         | [Targeting lists](/audience-and-activation/target-contextually/contextual-reference/targeting-lists.md)                      |
| **Activation**       | Sending a targeting list to an ad platform as key-value targeting.                                | [Contextual activation](/audience-and-activation/target-contextually/contextual-reference/contextual-activation.md)          |
| **Segment criteria** | Using extracted semantic information, or a targeting list, as a condition in an audience segment. | [Use contextual targeting in segments](/audience-and-activation/target-contextually/use-contextual-targeting-in-segments.md) |

## Prerequisites shared by both solutions

URLs and hits must be captured into the platform before any contextual extraction or semantic analysis can happen. Three routes exist:

* The **user event tag** - user tracking, using the URL explicitly passed in the event.
* The **contextual targeting tag** - no user tracking, capturing the page URL from the browser automatically.
* **User activities import**, for mobile apps only, where the `url` field must be populated.

The general setup - the schema update and the event rule - is mandatory for every customer using the feature, and is documented on [Contextual activation](/audience-and-activation/target-contextually/contextual-reference/contextual-activation.md). The activation setup is optional, and only needed if you plan to activate your targeting lists rather than only build audiences from contextual extraction.

{% hint style="info" %}
Only URLs with a minimum number of page views are analysed and targetable. Consult your Account manager to check or change that minimum for your organisation.
{% endhint %}

## 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>Target content based on a panel</strong></td><td>The procedure, starting from a segment.</td><td><a href="/audience-and-activation/target-contextually/target-content-based-on-a-panel.md">Target content based on a panel</a></td></tr><tr><td><strong>Target content based on semantic criteria</strong></td><td>The procedure, starting from the content itself.</td><td><a href="/audience-and-activation/target-contextually/target-content-based-on-semantic-criteria.md">Target content based on semantic criteria</a></td></tr></tbody></table>


---

# 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/audience-and-activation/target-contextually/contextual-reference.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.
