Send an Audience to The Trade Desk

Use Case

  • Upload your own customer list to your Trade Desk advertiser as first-party data, and keep it fresh on a schedule
  • See your Trade Desk campaigns in Delivr next to the campaigns Delivr runs, with the figures The Trade Desk reports

You connect your Trade Desk advertiser to a project once. After that, an export sends an audience to it on each run, and Delivr imports the advertiser's campaigns once a day.

Prerequisites

  • An organization API key and secret pair (Authentication).
  • A project id.
  • An audience built from your own data: an audience of type list (from a customer list you uploaded) or dataset (from a connected dataset). The Trade Desk takes first-party data only, so Delivr refuses any other audience.
  • From The Trade Desk, the credentials in the next table.

The Credentials and What Each Is For

FieldRequiredWhat Delivr does with it
advertiser_idYesNames the advertiser that receives the audiences. Delivr returns it in config.settings.advertiser_id.
advertiser_secretYesSigns each audience upload. Find it under Advertiser Preferences in The Trade Desk.
api_tokenNoReads your campaigns and their daily reports from The Trade Desk. Your Trade Desk account team enables API access.

Delivr encrypts advertiser_secret and api_token and never returns them. Without api_token, the audience upload works, but Delivr does not import your campaigns.


Steps

1. Connect Your Advertiser

curl -X POST "https://api.delivr.ai/api/v1/integrations?project_id=YOUR_PROJECT_ID" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "X-Api-Secret: YOUR_API_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "the_trade_desk",
    "name": "Our Trade Desk advertiser",
    "advertiser_id": "YOUR_ADVERTISER_ID",
    "advertiser_secret": "YOUR_ADVERTISER_SECRET",
    "api_token": "YOUR_API_TOKEN"
  }'

The response is the new integration. Note its id.

To check the credentials, send POST /api/v1/integrations/{id}/test. The answer gives a result for each credential: verified, rejected, unverified or not_provided.

2. Send an Audience

Create an export from your list or dataset audience to the integration from step 1. The destination takes only the integration, because the connection decides what is sent.

curl -X POST "https://api.delivr.ai/api/v1/exports" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "X-Api-Secret: YOUR_API_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "project_id": "YOUR_PROJECT_ID",
    "name": "Customer list to The Trade Desk",
    "query": {
      "sourceType": "audience",
      "sourceId": "YOUR_AUDIENCE_ID"
    },
    "schedule": "daily",
    "run_time": "06:00",
    "destination": {
      "type": "the_trade_desk",
      "integration_id": "YOUR_INTEGRATION_ID"
    }
  }'

If the audience is not a list or dataset audience, the create answers 400 with this message:

The Trade Desk takes only your own first-party data, such as an uploaded customer list or a connected dataset. This audience is built from Delivr data, so it cannot be sent there.

The same rule applies when you add this destination to an export, or change an export's source.

What Each Run Sends

  • Each run uploads the audience's UID2s to one segment in your advertiser, named delivr_audience_ and the audience id.
  • A person stays in the segment for 30 days after the last run that sent them. A daily export keeps current members in the segment.
  • A rename of the audience keeps the same segment, because the name uses the audience id.

Your Trade Desk Campaigns in Delivr

If the integration has an api_token, Delivr imports the advertiser's campaigns once a day. Each import also reads the daily impressions, clicks and spend for the last 7 days.

  • Where a campaign runs. Every campaign carries runs_on. delivr means Delivr runs it, and the_trade_desk means The Trade Desk runs it. A Trade Desk campaign also carries external_campaign_id, its id in The Trade Desk.
  • Filter by platform. Send runs_on with project_id to GET /api/v1/campaigns, for example ?project_id=YOUR_PROJECT_ID&runs_on=the_trade_desk. Any other value answers 400 and names the valid values.
  • Read only. You change a Trade Desk campaign in The Trade Desk. Every write to it in Delivr answers 409 with a plain-text message that names the platform.
  • Figures. GET /api/v1/campaigns/{id}/performance returns the figures The Trade Desk reported, one row per UTC day. The response carries runs_on and day_time_zone.

Null Means Not Reported

A figure The Trade Desk does not report is null, never 0. Today the import reads impressions, clicks and spend. So wins, bids, win_rate and viewability are null for a Trade Desk campaign. CTR, CPM and CPC use only the days that reported both of their parts. Read a null as "not reported", not as zero.

In GET /api/v1/campaigns/performance-summary, project totals add The Trade Desk's figures to Delivr's. A total is null only when no campaign reported it. Trade Desk days are UTC and Delivr days are Pacific time, so the response carries platform_day_time_zone.


Notes

  • One Trade Desk integration connects one advertiser to one project.
  • The project_id and integration_id must both belong to your key's organization.

Next Steps

  • Integrations API: create, test and rotate the credentials of an integration
  • Exports API: create, list, get, update and delete exports
  • Campaigns API: list campaigns, filter by runs_on, and read performance

Did this page help you?