> 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/plan-and-integrate/set-up-the-environment/set-up-channels.md).

# Channels

Declare each site and app you track as a channel, and attach the rules that apply to it.

## Your goal

Declare each website, mobile app, or CTV app you will track, so that the activity you collect can be attributed to the right property - and so that privacy rules, event rules, and analyzers can be applied per property.

## Expected outcome

Every property in your tracking plan has a channel in the datamart, and you know its ID, because that ID is what your tag and your API calls will send.

## What a channel is

A **channel** represents one of your sites or apps. If you have several sites or apps, you create a channel for each one. Each channel has an ID, representing a site ID, or an application ID - mobile or CTV.

When you attach a site ID or an app ID to a [UserActivity](/setup-and-monitor/understand-mediarithmics/how-mediarithmics-works.md#information-attached-to-a-userpoint), you link that activity to the corresponding channel.

Channels are what make two things possible:

* **Attaching data privacy rules to a specific site or app**, rather than to the datamart as a whole.
* **Querying and segmenting by property** - selecting only users who have activities on a specific site or app.

Channels are a datamart-level setting, managed in **Settings > Datamart > Channels**.

## Declare your channels

{% stepper %}
{% step %}

### List the properties in scope

One channel per site or app. Decide this together with your [tracking plan](/setup-and-monitor/collect-and-manage-your-data/collect-data-in-real-time/define-your-tracking-plan.md): the channel is the unit your events will be attributed to, so a distinction you cannot make with channels is a distinction you will not be able to query later.
{% endstep %}

{% step %}

### Create each channel

Go to **Settings > Datamart > Channels** and create the channel. The channel listing shows, per channel, the number of events over the last 7 days, or the number of single users over the last 7 days - useful later as a first check that collection is working.
{% endstep %}

{% step %}

### Attach the rules that apply to it

When editing a channel you can configure additional rules relating to the processing of data:

| Rule                            | What it does                                                                                                                                     | Where it is documented                                                                                                                 |
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------- |
| **User Choices - Privacy Wall** | Declares the processing activities that justify capturing personal data on this channel, and lets the platform check user choices automatically. | [Manage consent & Processing activities](/setup-and-monitor/ensure-privacy-and-compliance/manage-consent-and-processing-activities.md) |
| **Event rules**                 | Predefined actions that extract properties, reshape data, or identify a user from a property.                                                    | [Event rules](/setup-and-monitor/collect-and-manage-your-data/collect-data-in-real-time/event-rules.md)                                |
| **Visit analyzer**              | A plugin that modifies an activity on the fly before it is stored.                                                                               | [Activity analyzers](/setup-and-monitor/collect-and-manage-your-data/collect-data-in-real-time/activity-analyzers.md)                  |
| {% endstep %}                   |                                                                                                                                                  |                                                                                                                                        |

{% step %}

### Enable the identifiers you need on the channel

Some device registry identifiers require channel configuration updates before tracking with them works properly on your sites. IP address capture, in particular, is activated on the channel. See [Device registries](/setup-and-monitor/plan-and-integrate/set-up-the-environment/set-up-device-registries.md).
{% endstep %}
{% endstepper %}

## Attaching a processing activity to a channel

To activate the privacy wall on a channel, go to **Settings > Datamart > Channels** and edit the channel. In the **User Choices - Privacy Wall** section, add the processing activity or activities that justify the capture of personal data in this channel, then save.

From that moment, for a new or existing user, when saving a UserActivity related to the channel the platform automatically checks the user's choices. If the choices are not compatible, the UserActivity is dropped.

{% hint style="danger" %}
Make sure you already have valid user choices in your datamart - or `$set_user_choice` events in your user activities - **before** enforcing this configuration. Dropped data cannot be recovered.
{% endhint %}

## Verify

* Each property in your tracking plan has exactly one channel.
* You have recorded each channel ID next to the property it represents; your tag and API integrations need it.
* After the first data arrives, the channel listing shows a non-zero event count over the last 7 days.

## 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>Compartments</strong></td><td>The equivalent decision for accounts and profiles.</td><td><a href="/setup-and-monitor/plan-and-integrate/set-up-the-environment/set-up-compartments.md">Compartments</a></td></tr><tr><td><strong>Define your tracking plan</strong></td><td>Decide what you send on each channel.</td><td><a href="/setup-and-monitor/collect-and-manage-your-data/collect-data-in-real-time/define-your-tracking-plan.md">Define your tracking plan</a></td></tr><tr><td><strong>Manage consent &#x26; Processing activities</strong></td><td>What a processing activity is, and how the privacy wall works.</td><td><a href="/setup-and-monitor/ensure-privacy-and-compliance/manage-consent-and-processing-activities.md">Manage consent &amp; Processing activities</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/setup-and-monitor/plan-and-integrate/set-up-the-environment/set-up-channels.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.
