---
title: "Map traffic types to channels"
slug: "map-traffic-types-to-channels"
abstract: "How to convert traffic types to channels."
---
# Map traffic types to channels

In the Sitecore Experience Platform (xDB) version 8.0 and later, the Marketing Taxonomy includes channels that replace traffic types. [Channels](https://doc.sitecore.com/xp/en/users/91/sitecore-experience-platform/channels.html) enable you to classify the different paths that contacts use to interact with your website.

If you have upgraded from an earlier version of Sitecore or have created your own custom traffic types, then you need to map your existing traffic types to channels.

You can find channels in the following location in the content tree:

*/sitecore/system/Marketing Control Panel/Taxonomies/Channel*

<details>
<summary><h2>Default mapping</h2></summary>

The default mapping information from traffic types to channels is defined in the `Sitecore.Analytics.Compatibility.config` configuration file.

```xml
<compatibility>
<trafficTypeConverter type="Sitecore.Analytics.Data.ConfigurationBasedTrafficTypeConverter, Sitecore.Analytics" />
<trafficType default="{00000000-0000-0000-0000-000000000000}">
  <add trafficType="15" channel="{FB8FA660-0A07-4EE9-A9F4-930FC5D10AEC}" />
  <add trafficType="10" channel="{B979A670-5AAF-4E63-94AC-C3C3E5BFBE84}" />
  <add trafficType="20" channel="{B418E4F2-1013-4B42-A053-B6D4DCA988BF}" />
  <add trafficType="30" channel="{44DD9FF5-44B2-4C59-8DF8-849E400F4B6B}" />
  <add trafficType="31" channel="{44DD9FF5-44B2-4C59-8DF8-849E400F4B6B}" />
  <add trafficType="32" channel="{44DD9FF5-44B2-4C59-8DF8-849E400F4B6B}" />
  <add trafficType="33" channel="{1DA15267-B0DB-4BE1-B44F-E57C2EEB8A6B}" />
  <add trafficType="34" channel="{1DA15267-B0DB-4BE1-B44F-E57C2EEB8A6B}" />
  <add trafficType="35" channel="{62D19735-E898-4FF5-B53A-13B02D3B8D6F}" />
  <add trafficType="36" channel="{44DD9FF5-44B2-4C59-8DF8-849E400F4B6B}" />
  <add trafficType="40" channel="{B2747066-06F8-4E0B-9EA7-64D8859A119A}" />
  <add trafficType="50" channel="{52B75873-4CE0-4E98-B63A-B535739E6180}" />
  <add trafficType="90" channel="{B5234879-DFFC-47AF-8267-59D4D3DF6226}" />
</trafficType>
</compatibility>

```

This configuration file takes all the standard Sitecore traffic types and converts them automatically to channels. Each traffic type is numbered and maps to a predefined channel that you can identify by the item ID.

In the following example:

```text
<add trafficType="15" channel="{FB8FA660-0A07-4EE9-A9F4-930FC5D10AEC}" />

```

- `trafficType="15"` refers to Search Engine - Organic Branded traffic type.
- `Channel="{FB8FA660-0A07-4EE9-A9F4-930FC5D10AEC}"` refers to the Organic branded search channel.

> [!note]
> The `trafficTypeConverter` node identifies the class that performs the mapping:
>
> `Sitecore.Analytics.Data.ConfigurationBasedTrafficTypeConverter, Sitecore.Analytics`
>
> This class is instantiated via the Sitecore object factory and is derived from the `TrafficTypeConverter` class. The implementation specified in the configuration file uses the mappings specified in the configuration file.
>
> The `trafficType` node has a single attribute named `default`. If a traffic type is encountered that has no mapping specified, then this channel ID is returned by default.

</details>

<details>
<summary><h2>Custom mapping</h2></summary>

To map your own custom traffic types to channels, you must edit the `Sitecore.Analytics.Compatibility.config` file to include your custom mappings.

> [!note]
> Do not make changes directly to the configuration files. Instead, you must create a [patch file](https://doc.sitecore.com/xp/en/developers/91/platform-administration-and-architecture/use-a-patch-file-to-customize-the-sitecore-configuration.html "Use a patch file to customize the Sitecore configuration") that performs the required changes during run time.

To add custom mappings:

1. In the `App_Config\Sitecore\Marketing.Tracking` folder, open the `Sitecore.Analytics.Compatibility.config` file.
2. Navigate to the `<compatibility>` node.
3. To map a custom traffic type to a channel, create a new entry similar to one of the other entries, with the `trafficType` and `channel` attributes set to your own custom values. For example:

    `<add trafficType="15" channel="{FB8FA660-0A07-4EE9-A9F4-930FC5D10AEC}" />`

4. To find the traffic type parameter, open the Sitecore installation where you created your custom traffic type and navigate to the Traffic Type folder:

    /sitecore/system/Settings/Analytics/Traffic Type/

5. Find the Custom Traffic Type item that you created and copy the **ID** from the **Value** field.

    `trafficType="100"`

    ![357C916B7EDA416DAFC7CF640A8C5854.png](https://doc.sitecore.com/api/markdown-image/xp/en/developers/91/platform-administration-and-architecture/images/357C916B7EDA416DAFC7CF640A8C5854.png)

6. In the Sitecore installation where you have created your custom channel, open the Content Editor and navigate to the channel node and copy the **Item ID** of the custom channel item:

    /sitecore/system/Marketing Control Panel/Taxonomies/Channel

    ![2770BFAC42634D2FA6CDE75E28623664.png](https://doc.sitecore.com/api/markdown-image/xp/en/developers/91/platform-administration-and-architecture/images/2770BFAC42634D2FA6CDE75E28623664.png)

7. Replace the trafficType and channel attributes with the IDs you copied, for example:

    `<add trafficType="100"`

    `channel="{73670D5B-477D-462E-A4B3-95F679CE2A28}"/>`

    Then save your changes.

8. To test your mapping, create a visit to your website using the traffic type you want to map. Once the session ends or times out the interaction is stored in the xDB.
9. In the xDB MongoDB collection, locate the interaction document for the visit. Verify that the **ChannelId** field matches the channel ID you have configured in the mapping section.

> [!note]
> If you need to create new channels for your custom traffic types, you must [customize the marketing taxonomy](https://doc.sitecore.com/xp/en/users/91/sitecore-experience-platform/create-a-channel.html).

</details>