> For the complete documentation index, see [llms.txt](https://help.branch.io/llms.txt).

# Enable The Trade Desk (New)

> Connect The Trade Desk to Branch to attribute clicks and installs on programmatic digital advertising campaigns.

## Overview

[The Trade Desk](https://www.thetradedesk.com/) is a self-service, cloud-based demand-side platform (DSP) for programmatic digital advertising. Connect The Trade Desk to Branch to attribute clicks and installs and configure Postbacks.

For more information about integrating ad partners in general, visit our [Ad Partner Integration Guide](https://help.branch.io/marketer-hub/ad-partner-integration-guide-new.md).

> **Note: this guide is for new Branch**
>
> Please note that this guide is about integrating The Trade Desk in the [new Branch experience](https://help.branch.io/marketer-hub/new-branch-overview.md). For information on The Trade Desk in legacy Branch, visit our [legacy guide](https://help.branch.io/marketer-hub/the-trade-desk.md).

### Partner capabilities

| Capability | Details |
| --- | --- |
| Company type | DSP |
| Deep linking | Supported |
| Attribution | Click-through attribution, View-through attribution (except web events) |
| Ad campaign types | Acquisition campaigns, Retargeting campaigns |
| Ad formats | Contact The Trade Desk for details. |
| Click types | Server-side click |
| Supported platforms | iOS, Android, Amazon, Windows, macOS, Unix, Apple TV, Android TV, Samsung TV, Amazon Fire TV, Tizen |
| Link wrapping | Supported |
| Cost ingestion support | Not supported |
| Pricing models | CPM |

## Before you begin

To set up the integration with The Trade Desk, you need:

- Ad partner integrations enabled for your Branch account. Availability varies by Branch plan. See [Branch pricing](https://www.branch.io/pricing/) or contact your Branch representative.
- A Branch account with access to **Configuration > Ad Partners** and admin permissions to enable and configure integrations.
- The Trade Desk account with admin access. You'll need the following credentials, available from your account manager at The Trade Desk: Advertiser ID, iOS Event Tracker ID, Android Event Tracker ID, and Web Event Tracker ID.
- [PAM](https://help.branch.io/marketer-hub/predictive-aggregate-measurement.md) enabled (recommended).

> **Note: PAM uses two separate toggles**
>
> The **PAM for Publishers** toggle for this partner, found under **Partner settings** > **Manage account**, is separate from the account-level **PAM switch**. **PAM for Publishers** must be enabled to reconcile conversion events with your partner. To attribute events with PAM, you also need PAM enabled on the [Attribution page](https://help.branch.io/account-hub/attribution-page-new.md) under **Configuration** > **Attribution**. Learn more in our [PAM Overview](https://help.branch.io/marketer-hub/predictive-aggregate-measurement.md#pam-for-publishers).

## Enable The Trade Desk

To begin, navigate to **Configuration > Ad Partners > The Trade Desk**.

Enter your **Advertiser ID**, **iOS Event Tracker ID**, **Android Event Tracker ID**, and **Web Event Tracker ID**, then select **Enable The Trade Desk** on The Trade Desk page. Contact your account manager at The Trade Desk if you need these values.

## Configure attribution

To configure attribution windows, select the **Attribution windows** tab on The Trade Desk page.

To minimize discrepancies when comparing Branch and The Trade Desk reporting, match your Branch attribution windows to the settings in your account at The Trade Desk.

| Attribution type | Default | The Trade Desk's recommendation |
| --- | --- | --- |
| Click to start session | 1 day | 90 days |
| Click to install | 7 days | 30 days |
| Click to conversion event | 30 days | 90 days |
| Impression to start session | 1 day | 1 day |
| Impression to install | 1 day | 1 day |
| Impression to conversion event | 7 days | 1 day |
| Deep linking duration | 120 minutes | — |

For more information, follow [Configure attribution](https://help.branch.io/marketer-hub/ad-partner-integration-guide-new.md#configure-attribution) in the general [Ad Partner Integration Guide](https://help.branch.io/marketer-hub/ad-partner-integration-guide-new.md).

## Configure postbacks

Enabling The Trade Desk automatically activates postbacks for `INSTALL` and `PURCHASE`. The default postback URL template is:

```
https://insight.adsrvr.org/track/upapp?provider=branch&adv=${ (ad_network.credentials.advertiser_id)! }&upid=<#if (user_data.os)! == "IOS">${ad_network.credentials.ios_event_tracker_id}<#elseif (user_data.os)! == "ANDROID">${ad_network.credentials.and_event_tracker_id}<#elseif (user_data.os)! == "WINDOWS">${ad_network.credentials.web_event_tracker_id}<#elseif (user_data.os)! == "MAC_OS">${ad_network.credentials.web_event_tracker_id}</#if>&ref=${ (name)! }&client_ip=${ (user_data.ip)! }&idfa=${ (user_data.idfa)! }&gps_adid=${ (user_data.aaid)! }&v=${ (event_data.revenue)! }&vf=${ (event_data.currency)! }&iattr=<#if (last_attributed_touch_data.$3p)! == (ad_network.machine_name)!>1<#else>0</#if>&ivtc=<#if (last_attributed_touch_type)! == 'IMPRESSION'>1<#else>0</#if>&imp=${ (last_attributed_touch_data.impression_id)! }
```

To add postbacks for additional events or to customize behavior, follow [Configure postbacks](https://help.branch.io/marketer-hub/ad-partner-integration-guide-new.md#configure-postbacks) in the general [Ad Partner Integration Guide](https://help.branch.io/marketer-hub/ad-partner-integration-guide-new.md).

## Create a Branch Ad Link

Create a Branch Ad Link to use in your campaigns in The Trade Desk. Branch uses the link to attribute clicks and deep link users into your app.

Follow [Create Ad Links](https://help.branch.io/marketer-hub/ad-links-new.md).

## Verify your data

After your integration is connected and events are flowing, you can verify data is reaching Branch:

- **In Branch** [**Liveview**](https://app.branch.io/testing-and-monitoring/events): confirm that events from your app appear in real time. This is the fastest way to confirm SDK events are firing.
- **In Branch** [**Analysis dashboards**](https://help.branch.io/marketer-hub/analysis-data-sources-new.md): review attributed installs and events where `Ad Partner Name = The Trade Desk`.
- **In The Trade Desk**: confirm that forwarded events are appearing in attribution reporting in The Trade Desk.

## Data mappings

### Campaign data

Branch populates the following fields from The Trade Desk campaign data.

| Branch field | Partner data |
| --- | --- |
| `~advertising_partner_name` | `"The Trade Desk"` (static) |
