> ## Documentation Index
> Fetch the complete documentation index at: https://docs.permutive.com/llms.txt
> Use this file to discover all available pages before exploring further.

# The Trade Desk

> Integrate with The Trade Desk for targeting and campaign optimization

export const OnRequestBadge = () => {
  return <span style={{
    display: 'inline-block',
    padding: '0.125rem 0.5rem',
    borderRadius: '0.25rem',
    fontSize: '0.625rem',
    background: '#FCE3B7',
    color: '#1A1A1A',
    fontWeight: '500',
    whiteSpace: 'nowrap'
  }}>
      On request
    </span>;
};

export const YesBadge = () => {
  return <span style={{
    display: 'inline-block',
    padding: '0.125rem 0.5rem',
    borderRadius: '0.25rem',
    fontSize: '0.625rem',
    background: '#C7E8F9',
    color: '#1A1A1A',
    fontWeight: '500'
  }}>
      Yes
    </span>;
};

export const BadgeRowCenter = ({label, children}) => {
  return <div style={{
    display: 'flex',
    justifyContent: 'space-between',
    alignItems: 'center',
    marginBottom: '0.5rem'
  }}>
      <span style={{
    fontSize: '0.625rem',
    color: '#6b7280',
    textTransform: 'uppercase',
    fontWeight: '500',
    letterSpacing: '0.05em'
  }}>
        {label}
      </span>
      {children}
    </div>;
};

export const BadgeRow = ({label, children}) => {
  return <div style={{
    display: 'flex',
    justifyContent: 'space-between',
    alignItems: 'flex-start',
    marginBottom: '0.5rem'
  }}>
      <span style={{
    fontSize: '0.625rem',
    color: '#6b7280',
    textTransform: 'uppercase',
    fontWeight: '500',
    letterSpacing: '0.05em'
  }}>
        {label}
      </span>
      {children}
    </div>;
};

export const BadgeContainer = ({children}) => {
  return <div style={{
    display: 'flex',
    gap: '0.25rem',
    flexWrap: 'wrap',
    justifyContent: 'flex-end',
    minWidth: '0',
    flex: '1'
  }}>
      {children}
    </div>;
};

export const ProductRequiredBadge = ({product}) => {
  const getBadgeStyle = product => {
    switch (product) {
      case 'Core Platform':
        return {
          background: '#CB88FC',
          color: '#1A1A1A'
        };
        --purple;
      case 'Routing':
        return {
          background: '#CB88FC',
          color: '#1A1A1A'
        };
        --purple;
      case 'Contextual':
        return {
          background: '#CB88FC',
          color: '#1A1A1A'
        };
        --purple;
      default:
        return {
          background: '#A7B3D9',
          color: '#1A1A1A'
        };
        --haze;
    }
  };
  const style = getBadgeStyle(product);
  return <span style={{
    display: 'inline-block',
    padding: '0.125rem 0.375rem',
    borderRadius: '0.25rem',
    fontSize: '0.625rem',
    background: style.background,
    color: style.color,
    fontWeight: '500'
  }}>
      {product}
    </span>;
};

export const SdkRequiredBadge = ({required}) => {
  const getBadgeStyle = required => {
    switch (required) {
      case 'Yes':
        return {
          background: '#C7E8F9',
          color: '#1A1A1A'
        };
        --blue;
      case 'No':
        return {
          background: '#F7D0E2',
          color: '#1A1A1A'
        };
        --pink;
      default:
        return {
          background: '#A7B3D9',
          color: '#1A1A1A'
        };
        --haze;
    }
  };
  const style = getBadgeStyle(required);
  return <span style={{
    display: 'inline-block',
    padding: '0.125rem 0.375rem',
    borderRadius: '0.25rem',
    fontSize: '0.625rem',
    background: style.background,
    color: style.color,
    fontWeight: '500'
  }}>
      {required}
    </span>;
};

export const CapabilityBadge = ({capability}) => {
  const getBadgeStyle = capability => {
    switch (capability) {
      case 'Event Collection':
        return {
          background: '#EFDFC8',
          color: '#1A1A1A'
        };
        --clay;
      case 'Cohort Activation':
        return {
          background: '#EFDFC8',
          color: '#1A1A1A'
        };
        --clay;
      case 'Campaign Optimization':
        return {
          background: '#EFDFC8',
          color: '#1A1A1A'
        };
        --clay;
      case 'Identity Signal':
        return {
          background: '#EFDFC8',
          color: '#1A1A1A'
        };
        --clay;
      case 'Contextual Signal':
        return {
          background: '#EFDFC8',
          color: '#1A1A1A'
        };
        --clay;
      case 'Connectivity':
        return {
          background: '#EFDFC8',
          color: '#1A1A1A'
        };
        --clay;
      case 'Routing':
        return {
          background: '#EFDFC8',
          color: '#1A1A1A'
        };
        --clay;
      case 'Data Collaboration':
        return {
          background: '#EFDFC8',
          color: '#1A1A1A'
        };
        --clay;
      default:
        return {
          background: '#A7B3D9',
          color: '#1A1A1A'
        };
        --haze;
    }
  };
  const style = getBadgeStyle(capability);
  return <span style={{
    display: 'inline-block',
    padding: '0.125rem 0.375rem',
    borderRadius: '0.25rem',
    fontSize: '0.625rem',
    background: style.background,
    color: style.color,
    fontWeight: '500',
    whiteSpace: 'nowrap'
  }}>
      {capability}
    </span>;
};

export const EnvironmentBadge = ({environment}) => {
  const getBadgeStyle = environment => {
    switch (environment) {
      case 'Web':
        return {
          background: '#F9C1A8',
          color: '#1A1A1A'
        };
        --peach;
      case 'iOS':
        return {
          background: '#F9C1A8',
          color: '#1A1A1A'
        };
        --peach;
      case 'Android':
        return {
          background: '#F9C1A8',
          color: '#1A1A1A'
        };
        --peach;
      case 'CTV':
        return {
          background: '#F9C1A8',
          color: '#1A1A1A'
        };
        --peach;
      case 'API Direct':
        return {
          background: '#F9C1A8',
          color: '#1A1A1A'
        };
        --peach;
      default:
        return {
          background: '#A7B3D9',
          color: '#1A1A1A'
        };
        --haze;
    }
  };
  const style = getBadgeStyle(environment);
  return <span style={{
    display: 'inline-block',
    padding: '0.125rem 0.375rem',
    borderRadius: '0.25rem',
    fontSize: '0.625rem',
    background: style.background,
    color: style.color,
    fontWeight: '500',
    whiteSpace: 'nowrap'
  }}>
      {environment}
    </span>;
};

export const DirectionBadge = ({direction}) => {
  const getBadgeStyle = direction => {
    switch (direction) {
      case 'Bidirectional':
        return {
          background: '#FA8784',
          color: '#1A1A1A'
        };
        --tomato;
      case 'Destination':
        return {
          background: '#FA8784',
          color: '#1A1A1A'
        };
        --tomato;
      case 'Source':
        return {
          background: '#FA8784',
          color: '#1A1A1A'
        };
        --tomato;
      default:
        return {
          background: '#A7B3D9',
          color: '#1A1A1A'
        };
        --haze;
    }
  };
  const style = getBadgeStyle(direction);
  return <span style={{
    display: 'inline-block',
    padding: '0.125rem 0.375rem',
    borderRadius: '0.25rem',
    fontSize: '0.625rem',
    background: style.background,
    color: style.color,
    fontWeight: '500'
  }}>
      {direction}
    </span>;
};

<Card title="">
  <div style={{ display: 'flex', alignItems: 'center', marginBottom: '1rem' }}>
    <div style={{ width: '32px', height: '32px', marginRight: '0.75rem', display: 'flex', alignItems: 'center', justifyContent: 'center', flexShrink: 0 }}>
      <img src="https://mintcdn.com/permutive/pNhz39ducTVcQczh/images/integrations/logos/the-trade-desk.svg?fit=max&auto=format&n=pNhz39ducTVcQczh&q=85&s=51d0468198c0758633366eecfd00448f" alt="The Trade Desk" style={{ maxWidth: '32px', maxHeight: '32px', display: 'block' }} width="800" height="845" data-path="images/integrations/logos/the-trade-desk.svg" />
    </div>

    <h3 style={{ margin: 0, fontSize: '1.125rem', fontWeight: '600' }}>The Trade Desk</h3>
  </div>

  <div style={{ marginBottom: '1rem' }}>
    <BadgeRowCenter label="Direction">
      <DirectionBadge direction="Destination" />
    </BadgeRowCenter>

    <BadgeRowCenter label="Environment">
      <BadgeContainer>
        <EnvironmentBadge environment="Web" />

        <EnvironmentBadge environment="iOS" />

        <EnvironmentBadge environment="Android" />

        <EnvironmentBadge environment="CTV" />

        <EnvironmentBadge environment="API Direct" />
      </BadgeContainer>
    </BadgeRowCenter>

    <BadgeRowCenter label="Capability">
      <BadgeContainer>
        <CapabilityBadge capability="Cohort Activation" />
      </BadgeContainer>
    </BadgeRowCenter>

    <BadgeRowCenter label="SDK Required">
      <SdkRequiredBadge required="Yes" />
    </BadgeRowCenter>

    <BadgeRowCenter label="Product(s) Required">
      <ProductRequiredBadge product="Core Platform" />
    </BadgeRowCenter>
  </div>

  <p style={{ margin: 0, fontSize: '0.875rem', color: '#6b7280', lineHeight: '1.5' }}>
    The Trade Desk is the world's largest independent demand-side platform, enabling advertisers to buy digital advertising across multiple channels with advanced targeting capabilities.
  </p>
</Card>

<CardGroup cols={2}>
  <Card title="Setup" href="#setup" icon="gear" />

  <Card title="Troubleshooting" href="#troubleshooting" icon="wrench" />
</CardGroup>

## Overview

The Trade Desk is a leading independent demand-side platform (DSP) that empowers advertisers and agencies to programmatically buy digital advertising inventory across display, video, mobile, connected TV, audio, and native formats. Our integration with The Trade Desk enables [server-side identity-based activation](/integrations/server-side-identity-based-activation), allowing you to target your Permutive cohorts in programmatic campaigns.

This integration is a Destination:

* **Destination:** Permutive activates your cohorts to The Trade Desk via a server-to-server API, enabling you to target users with cohort membership data in programmatic advertising campaigns.

The standard Web integration works via a two-step process:

1. **Cookie Sync**: The Permutive Web SDK initiates a cookie sync with The Trade Desk to obtain and store The Trade Desk's cookie ID as an alias for each user.
2. **Cohort Activation**: When users fall into activated cohorts, Permutive looks up The Trade Desk cookie ID from the aliases table and makes a server-side API call to The Trade Desk, informing them of the user's cohort membership.

There are two variations of this integration:

* **The Trade Desk 1P**: For first-party targeting and retargeting your own website visitors across The Trade Desk's inventory.
* **The Trade Desk 3P**: For selling your Permutive audiences to advertisers using The Trade Desk's platform, enabling third-party data monetization.

<Note>
  The standard integration uses cookie-based identity matching, which limits live activation to Web. Extending the integration to support iOS (IDFA), Android (AAID), and CTV (IP or hashed email) can be an alternative path — contact your Permutive Customer Success Manager to discuss your use case.
</Note>

Use cases include:

* Retarget your website visitors across display, video, and CTV campaigns with cohorts built from first-party behavioral data.
* Activate lookalike audiences and custom segments for programmatic advertising.
* Sell third-party audience segments to advertisers through The Trade Desk's marketplace.
* Measure campaign performance and optimize based on audience engagement.

## Environment Compatibility

| Environment    | Supported          | Notes                                                          |
| -------------- | ------------------ | -------------------------------------------------------------- |
| **Web**        | <YesBadge />       | Live — via Trade Desk cookie ID (third-party cookie dependent) |
| **iOS**        | <OnRequestBadge /> | Via IDFA — discuss with your CSM                               |
| **Android**    | <OnRequestBadge /> | Via AAID — discuss with your CSM                               |
| **CTV**        | <OnRequestBadge /> | Via IP or hashed email — discuss with your CSM                 |
| **API Direct** | <YesBadge />       | Via any supported identifier                                   |

<Note>
  The Trade Desk integration currently uses cookie-based identity matching (Web only). Extending it to iOS, Android, and CTV via alternative identity types is something Permutive can support, though it requires additional build work — contact your Permutive Customer Success Manager to discuss your use case.
</Note>

## Prerequisites

**Required for all activation methods:**

* **The Trade Desk Account** — an active advertiser or agency account with The Trade Desk.
* **Advertiser ID** — your Trade Desk Advertiser ID, configured in the Permutive Dashboard. This identifier links your Permutive cohorts to your Trade Desk account.

**For Web (live today):**

* **Permutive Web SDK** — deployed on your website to enable the cookie sync and cohort activation mechanisms.
* **Third-party cookies** — users must have third-party cookies enabled in their browsers for the cookie sync to function (primarily Chrome-based browsers — see Web setup tab).

**For iOS / Android / CTV:**

* This connector currently uses cookie-based matching only. If your use case calls for IDFA, AAID, IP, or hashed email, additional build work would be needed.
* Identity collection for the chosen identity types would need to be configured in Permutive as part of any extension.
* Contact your Permutive Customer Success Manager to discuss.

## Setup

<Tabs>
  <Tab title="Primary Setup Steps">
    <Steps>
      <Step title="Enable in Permutive Dashboard">
        You must enable The Trade Desk integration in the Permutive Dashboard.

        1. Navigate to the Permutive dashboard
        2. Go to your workspace's integrations page
        3. Click "Add Integration" and select either:
           * **The Trade Desk - 1P** for first-party retargeting, or
           * **The Trade Desk - 3P** for third-party audience sales
        4. Enter your Trade Desk Advertiser ID when prompted
        5. Save the integration configuration

        Once enabled, the Permutive SDK will automatically begin the cookie sync process for users visiting your site.
      </Step>

      <Step title="Configure Cohort Activation">
        After enabling the integration, you must configure which cohorts should be activated to The Trade Desk.

        1. In the Permutive Dashboard, navigate to one of your cohorts
        2. Look for The Trade Desk activation option in the cohort configuration
        3. Toggle the activation to "On" for cohorts you want to sync to The Trade Desk
        4. The activation will fire when users enter or exit the cohort

        When a user falls into an activated cohort, Permutive will:

        * Look up The Trade Desk cookie ID from the user's aliases
        * Make a server-side API request to The Trade Desk
        * Inform The Trade Desk that this user is a member of the cohort
      </Step>

      <Step title="Verify Setup">
        Verify that the integration is working correctly.

        1. Check your browser's developer tools Network tab for requests to The Trade Desk domain during the cookie sync process
        2. Look for redirect requests from The Trade Desk back to Permutive's identity API
        3. In The Trade Desk platform, verify that your Permutive audiences are appearing and being populated
        4. Check that audience sizes in The Trade Desk match your expected cohort sizes (accounting for cookie matching rates)

        <Note>
          The cookie sync happens client-side via the SDK, while cohort membership updates are sent server-side. There may be a slight delay between a user entering a cohort and appearing in The Trade Desk audience.
        </Note>
      </Step>
    </Steps>
  </Tab>

  <Tab title="Web">
    <Note>
      This integration requires third-party cookies to be enabled. As of 2023, this means the Web integration primarily works in Chrome-based browsers. Safari and Firefox block third-party cookies by default, which prevents the cookie sync mechanism from functioning.
    </Note>

    ### Cookie Sync Process

    The Permutive Web SDK automatically handles the cookie sync with The Trade Desk. Here's how it works:

    1. **Initial Request**: The SDK makes a request to The Trade Desk's domain
    2. **302 Redirect**: The Trade Desk responds with a 302 redirect back to Permutive's identity API
    3. **Cookie ID Capture**: The redirect URL includes the user's Trade Desk cookie ID, which was read from the request headers
    4. **Alias Storage**: Permutive's identity API stores this cookie ID as an alias (type: `tradedesk` for 1P or `thirdparty_tradedesk` for 3P)

    This process happens automatically when users visit your site with the Permutive SDK deployed.

    ### Browser Compatibility

    The cookie sync requires third-party cookies to function:

    * **Chrome and Chromium-based browsers**: Fully supported
    * **Safari**: Not supported (blocks third-party cookies by default)
    * **Firefox**: Not supported (blocks third-party cookies by default with Enhanced Tracking Protection)
    * **Brave**: Not supported (blocks third-party cookies by default)

    ### Verifying Cookie Sync

    To verify the cookie sync is working:

    1. Open your browser's developer tools
    2. Navigate to the Network tab
    3. Visit your website
    4. Look for requests to The Trade Desk domain
    5. Check for a 302 redirect response
    6. Verify the redirect URL points to Permutive's identity API and includes cookie ID parameters
  </Tab>

  <Tab title="iOS">
    The standard Trade Desk integration uses cookie-based matching and does not cover iOS in-app inventory by default. Extending the integration to support iOS via IDFA can be an alternative path.

    **What this involves:**

    * Permutive would extend the existing Trade Desk connector to upload cohort memberships keyed by IDFA in addition to the existing cookie ID flow.
    * IDFA collection from your iOS app via the Permutive Mobile SDK (with ATT consent) would need to be configured.
    * Cohorts would then become available for targeting against The Trade Desk's iOS in-app inventory.

    This requires scoping on Permutive's side and coordination with your Trade Desk account team. Contact your Permutive Customer Success Manager to discuss your use case.
  </Tab>

  <Tab title="Android">
    The standard Trade Desk integration uses cookie-based matching and does not cover Android in-app inventory by default. Extending the integration to support Android via AAID can be an alternative path.

    **What this involves:**

    * Permutive would extend the existing Trade Desk connector to upload cohort memberships keyed by AAID in addition to the existing cookie ID flow.
    * AAID collection from your Android app via the Permutive Mobile SDK would need to be configured.
    * Cohorts would then become available for targeting against The Trade Desk's Android in-app inventory.

    This requires scoping on Permutive's side and coordination with your Trade Desk account team. Contact your Permutive Customer Success Manager to discuss your use case.
  </Tab>

  <Tab title="CTV">
    The standard Trade Desk integration uses cookie-based matching and does not cover CTV inventory by default. Extending the integration to support CTV via IP address or hashed email can be an alternative path.

    **What this involves:**

    * Permutive would extend the existing Trade Desk connector to upload cohort memberships keyed by the chosen CTV-relevant identity (IP address, hashed email, or another supported identifier).
    * Identity collection from your CTV environments would need to be configured.
    * Cohorts would then become available for targeting against The Trade Desk's CTV inventory.

    This requires scoping on Permutive's side and coordination with your Trade Desk account team. Contact your Permutive Customer Success Manager to discuss your use case.
  </Tab>
</Tabs>

## Data Types

<AccordionGroup>
  <Accordion title="Cohort Membership Data">
    When a user enters an activated cohort, Permutive sends the following information to The Trade Desk via server-side API:

    <ResponseField name="cookie_id" type="string">
      The Trade Desk's cookie ID for the user, obtained during the cookie sync process.
    </ResponseField>

    <ResponseField name="cohort_id" type="string">
      The Permutive cohort ID that the user has entered.
    </ResponseField>

    <ResponseField name="advertiser_id" type="string">
      Your Trade Desk Advertiser ID configured in the Permutive Dashboard.
    </ResponseField>
  </Accordion>
</AccordionGroup>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Cookie sync not working in Safari or Firefox">
    The Trade Desk integration requires third-party cookies, which are blocked by default in Safari and Firefox.

    **Solution**: This is an expected limitation. The integration will only work in browsers that support third-party cookies (primarily Chrome-based browsers). There is no workaround for this limitation with the current integration architecture.

    Consider using UID2 or other cookieless identifier solutions for broader browser reach. Contact your Customer Success Manager for information about alternative identity solutions.
  </Accordion>

  <Accordion title="Low match rates between Permutive and The Trade Desk">
    You may notice that your audience sizes in The Trade Desk are smaller than your cohort sizes in Permutive.

    **Possible causes**:

    * Users visiting in browsers that block third-party cookies (Safari, Firefox)
    * Users with ad blockers that prevent cookie syncing
    * Users who have cleared their cookies since visiting your site
    * Geographic differences (The Trade Desk may not operate in all regions)

    **Solution**: Match rates of 40-60% are typical due to third-party cookie limitations. To improve match rates:

    * Focus measurement on Chrome users where possible
    * Implement UID2 for cookieless identification
    * Ensure the Permutive SDK loads before users leave the page
  </Accordion>

  <Accordion title="Cohorts not appearing in The Trade Desk platform">
    Your activated cohorts may not appear in The Trade Desk interface.

    **Possible causes**:

    * The integration was recently enabled and data hasn't populated yet
    * Advertiser ID is incorrect in Permutive Dashboard
    * Cohort has no users with successful cookie syncs

    **Solution**:

    1. Verify your Advertiser ID in the Permutive Dashboard matches your The Trade Desk account
    2. Check that cohorts are toggled "On" for The Trade Desk activation
    3. Wait 24-48 hours after enabling activation for initial population
    4. Contact The Trade Desk support to verify they're receiving data from Permutive
  </Accordion>

  <Accordion title="Users remain in The Trade Desk audience after exiting cohort">
    Users may still appear in The Trade Desk audiences even after they've exited a cohort in Permutive.

    **Solution**: This may be due to caching or TTL (time-to-live) settings on The Trade Desk's side. Audience removals can take 24-48 hours to fully propagate. If users consistently remain in audiences longer than expected, contact The Trade Desk support to review your account's TTL settings.
  </Accordion>

  <Accordion title="Cookie sync blocked by ad blockers">
    Ad blocking browser extensions may prevent the cookie sync process from completing.

    **Solution**: This is an expected limitation. Users with ad blockers will not successfully complete the cookie sync and therefore won't be activatable in The Trade Desk. This is factored into expected match rates. There is no workaround for this limitation.
  </Accordion>
</AccordionGroup>

## Changelog

<Info>
  For detailed changelog information, visit our
  [Changelog](https://changelog.permutive.com/).
</Info>
