Configure events for The Trade Desk

The Trade Desk is a platform for wide internet advertising and enables the use of Universal ID 2.0 for first-party paid media advertising.

Use this destination to send offline measurement data to The Trade Desk, and then use that data for attribution and targeting.

Events help your brand track offline conversions–in-store sales, place visits, and other events–as they relate to your brand’s marketing campaigns. Send offline measurement data to The Trade Desk Events, and then use that data for attribution and targeting.

Tip

Send events to The Trade Desk Events as soon as possible, ideally, within 1 to 3 days of the transaction date and avoid sending data older than 25 days.

Note

This destination uses the POST /providerapi/offlineconversion endpoint for the Data Integration API to manage events.

Changes to audiences are not immediately available in The Trade Desk Events. Allow for up to 48 hours after the point at which Amperity has finished sending audience updates for them to be available.

Get details

Review the following details before configuring credentials for The Trade Desk Events and before configuring Amperity to send events to The Trade Desk Events.

Detail 1.

A UID 2.0 agreement and / or a European Unified ID (EUID) agreement .

Detail 2.

Credential settings

Amperity supports two credential types for The Trade Desk:

  • OAuth authenticates with an access token that Amperity requests from The Trade Desk. Your brand does not share a secret with Amperity. Amperity selects this credential type by default when you add a credential. Use it for every new The Trade Desk credential once The Trade Desk has granted Amperity access.

  • Advertiser secret (legacy) authenticates with your advertiser ID and advertiser secret.

OAuth

Before you add an OAuth credential, ask your account team at The Trade Desk to grant Amperity access to your advertiser, or to the partner that your advertiser belongs to. Amperity can send data only for an advertiser or partner that has granted Amperity access. Until The Trade Desk grants access, use an Advertiser secret (legacy) credential.

Advertiser ID

Required

The ID of the advertiser in The Trade Desk that Amperity sends data for. The Trade Desk must have granted Amperity access to this advertiser, or to its partner.

Partner ID

Optional. Enter a partner ID only when your account team at The Trade Desk granted Amperity access at the partner level. Amperity then requests access for the partner, which covers every advertiser under it. Leave Partner ID empty when Amperity has access to the advertiser itself.

Advertiser secret (legacy)

Advertiser ID

Required

The advertiser ID for an account with The Trade Desk Events.

Advertiser secret

Required

The advertiser secret for an account with The Trade Desk Events.

You can find the advertiser ID and secret key from the management console within The Trade Desk Events. Open “Preferences”, and then “First Party Data Credentials” to view the advertiser ID and secret key.

Detail 3.

Configuration settings

Offline Data Provider ID

Optional. The offline data provider ID assigned to your The Trade Desk Events account. Default value: “amperity”. Use the default value if your brand only sends data for first-party measurement. This setting applies only to an Advertiser secret (legacy) credential. An OAuth credential always sends data as the “amperity” offline data provider and ignores this setting.

Merchant ID

Required if The Trade Desk Events has assigned one to your brand. The merchant ID is a numeric platform identifier assigned to retailers who are onboarded to The Trade Desk Events as a Merchant. For example: “11001”.

Note

Brands onboarded to The Trade Desk as a Merchant have access to Product Catalog and event tracking features in The Trade Desk user interface.

Brands not onboarded to The Trade Desk as a Merchant can:

  1. Monetize conversation data for measurement and targeting using the Offline Provider ID.

  2. Request to be onboarded as a Merchant, after which a merchant identifier is assigned.

  3. Send conversion data to the advertiser seat at The Trade Desk for measurement within their own campaigns. Use “amperity” as the value for the Offline Provider ID setting for this use case.

Tracking tag name

The name of the tracking tag for events. Amperity looks up the tracking tag with this name, and creates it when it does not exist. Provide a Tracking tag name or a Tracking tag ID, but not both. A tracking tag name may contain only letters, numbers, and spaces. The name is a string, may have up to 256 characters, must be unique, and may not duplicate any previous advertiser name or offline data provider ID. The tracking tag name appears in the UI for The Trade Desk Events exactly as it is in Amperity.

The Trade Desk Events uses a combination of the tracking tag name, your brand’s advertiser ID, and offline data provider ID to build a unique offline tracking tag ID. Use the offline tracking ID to help measure the success of your brand’s marketing campaigns.

Tracking tag ID

The ID of an existing tracking tag in The Trade Desk. Amperity sends events under this tracking tag without looking it up. Provide a Tracking tag ID or a Tracking tag name, but not both. A tracking tag ID may contain only letters and numbers.

Use a tracking tag ID with an OAuth credential, and when Amperity’s credential cannot manage tracking tags for your account, such as a merchant account that uses its own offline data provider ID.

Create tracking tags in The Trade Desk, and copy the ID from there. Amperity does not show the ID of a tracking tag that it created from a Tracking tag name; find that ID in The Trade Desk.

Configure credentials

Configure credentials for The Trade Desk Events before adding a destination.

Amperity supports the following credential types for The Trade Desk:

  1. OAuth

  2. Advertiser secret (legacy)

To move a destination that uses an advertiser secret to OAuth, see Switch from an advertiser secret to OAuth.

OAuth

Before you add an OAuth credential, ask your account team at The Trade Desk to grant Amperity access to your advertiser, or to the partner that your advertiser belongs to. Amperity can send data only for an advertiser or partner that has granted Amperity access. Until The Trade Desk grants access, use an Advertiser secret (legacy) credential.

To configure credentials using OAuth

Step one.

From the Settings page, select the Credentials tab, and then click the Add credential button.

Step two.

In the Create credential dialog box, do the following:

  1. From the Plugin dropdown, select “The Trade Desk Offline Events”.

  2. Assign the credential a name and description that ensures other users of Amperity can recognize when to use this destination.

The Credential type dropdown selects OAuth by default. Keep it selected.

Step three.

Enter the advertiser ID, and then click Save. Enter a partner ID only when Amperity has access at the partner level.

Name and description

The name and description for a credential.

Advertiser ID

Required

The ID of the advertiser in The Trade Desk that Amperity sends data for. The Trade Desk must have granted Amperity access to this advertiser, or to its partner.

Partner ID

Optional. Enter a partner ID only when your account team at The Trade Desk granted Amperity access at the partner level. Amperity then requests access for the partner, which covers every advertiser under it. Leave Partner ID empty when Amperity has access to the advertiser itself.

Advertiser secret (legacy)

An Advertiser secret (legacy) credential uses the advertiser ID and the advertiser secret for your advertiser. Use an OAuth credential for every new The Trade Desk credential once The Trade Desk has granted Amperity access, unless the destination sends events under your brand’s own offline data provider ID.

An individual with access to The Trade Desk Events should use SnapPass to securely share “advertiser ID” and “advertiser secret” details with the individual who configures Amperity.

To configure credentials using an advertiser secret

Step one.

From the Settings page, select the Credentials tab, and then click the Add credential button.

Step two.

In the Create credential dialog box, do the following:

  1. From the Plugin dropdown, select “The Trade Desk Offline Events”.

  2. Assign the credential a name and description that ensures other users of Amperity can recognize when to use this destination.

From the Credential type dropdown, select Advertiser secret (legacy).

Step three.

Enter the advertiser ID and the advertiser secret, and then click Save.

Name and description

The name and description for a credential.

Advertiser ID

Required

The advertiser ID for an account with The Trade Desk Events.

Advertiser secret

Required

The advertiser secret for an account with The Trade Desk Events.

You can find the advertiser ID and secret key from the management console within The Trade Desk Events. Open “Preferences”, and then “First Party Data Credentials” to view the advertiser ID and secret key.

Switch from an advertiser secret to OAuth

A destination keeps its credential type until you change it. A destination that sends events under its own offline data provider ID keeps its Advertiser secret (legacy) credential: an OAuth credential always sends events under “amperity”. If the destination uses Tracking tag name, clear Tracking tag name and enter the Tracking tag ID before you test the connection. See Destination settings with OAuth.

To move a destination from an Advertiser secret (legacy) credential to an OAuth credential:

  1. Ask your account team at The Trade Desk to grant Amperity access to the advertiser, or to its partner.

  2. Add an OAuth credential with the same advertiser ID.

  3. Open the destination for editing. In the Credential section, click Edit. From the Credential type dropdown, select OAuth, select the credential you added, and then click Save.

  4. Test the connection, and then save the destination.

OAuth error messages

Testing the connection or running a workflow with an OAuth credential returns one of the following messages when The Trade Desk does not accept the credential:

Message

What to do

The Trade Desk has not granted Amperity access to advertiser <ID>. Check the IDs in this credential, and ask your Trade Desk account team to grant Amperity access to them.

Confirm that Advertiser ID and Partner ID are correct. If they are, ask your account team at The Trade Desk to grant Amperity access to the advertiser, or to its partner. When Partner ID is set, the message names the partner instead of the advertiser.

The Trade Desk rejected Amperity’s access token for this advertiser. Check that The Trade Desk still grants Amperity access to the advertiser in this credential, then test the connection again.

Ask your account team at The Trade Desk to confirm that Amperity still has access to the advertiser, and then test the connection again.

The Trade Desk has not set up the advertiser in this credential to accept first-party data. Check the advertiser ID, and ask your Trade Desk account team to enable it.

Applies to The Trade Desk destination. Confirm that Advertiser ID is correct, and then ask your account team at The Trade Desk to enable the advertiser to accept first-party data.

An OAuth credential also changes how some destination settings work. See Destination settings with OAuth.

Destination settings with OAuth

An OAuth credential changes how the following settings work:

  • Enter a Tracking tag ID. The Trade Desk refuses tracking tag lookups that use Amperity’s access token, so a Tracking tag name fails the connection test and the run with the message “Failed to connect to The Trade Desk with message: The Trade Desk refused Amperity’s access token for its tracking tag API. Enter the Tracking tag ID instead of the Tracking tag name: sending under a known ID needs no tracking tag API call.”

  • A Merchant ID needs the merchant’s own Tracking tag ID, which The Trade Desk creates when it onboards the merchant. When Merchant ID is set and Tracking tag ID is empty, the connection test and the run fail with the message “A Merchant ID needs the merchant’s own Tracking tag ID, which The Trade Desk creates when it onboards the merchant. Enter that Tracking tag ID, or clear the Merchant ID if this advertiser is not a merchant.”

  • Offline Data Provider ID is ignored. Amperity always sends data as the “amperity” offline data provider. A brand that sends events under its own offline data provider ID keeps an Advertiser secret (legacy) credential. If that brand’s destination switches to an OAuth credential, its events are sent under “amperity” instead.

Add destination

Use a sandbox to configure a destination for The Trade Desk Events. Before promoting your changes, send a sample audience, and then verify the results in The Trade Desk Events. After verifying the end-to-end workflow, push the destination from the sandbox to production.

To add a destination for The Trade Desk

Step one.

Open the Destinations page, select the New destinations button, and then select Orchestration.

To configure a destination for The Trade Desk Events, do one of the following:

  1. Click the row in which The Trade Desk Events is located. Destinations list alphabetically and you can scroll up and down the list.

  2. Search for The Trade Desk Events. Start typing “trade”. The list filters to show only matching destinations. Select “The Trade Desk Offline Events”.

Step two.

The Credential dropdown lists only credentials of the type selected in the Credential type dropdown, and OAuth is selected by default. Select the type of the credential you configured before you select the credential.

Select the credential for The Trade Desk Events from the Credential dropdown, and then click Continue.

Tip

Amperity validates the connection when the destination is saved. If the connection cannot be validated, an error is shown and the destination is not saved.

Step three.

In the “Destination settings” dialog box, assign the destination a name and description that ensures other users of Amperity can recognize when to use this destination.

Configure business user access

By default a destination is available to all users who have permission to view personally identifiable information (PII).

Enable the Admin only checkbox to restrict access to only users assigned to the Datagrid Operator and Datagrid Administrator policies.

Enable the PII setting checkbox to allow limited access to PII for this destination.

Use the Restrict PII access policy option to prevent users from viewing data marked as PII anywhere in Amperity and from sending data to downstream workflows.

Step four.

Configure the following settings, and then click “Save”.

Name and description

The name and description for a destination.

Business user access

By default a destination is available to all users who have permission to view personally identifiable information (PII).

Enable the Admin only checkbox to restrict access to only users assigned to the Datagrid Operator and Datagrid Administrator policies.

Enable the PII setting checkbox to allow limited access to PII for this destination.

Use the Restrict PII access policy option to prevent users from viewing data marked as PII anywhere in Amperity and from sending data to downstream workflows.

Membership duration

The length of time (in days), after which a customer is removed from this audience. This value may be between “0” - “180”. Set this value to “0” to remove all audience members.

The default value is “90”. The maximum value is “180”. Set to “0” to remove all audience members from the segment.

The membership duration is in days. Adjust the membership duration value to be greater than or equal to the frequency at which your brand sends campaigns or orchestrations from Amperity.

For example: if your brand sends a campaign to The Trade Desk Events every 30 days, then set membership duration to “30”. If your brand sends a campaign every 14 days, then set membership duration to “14”.

If your brand sends a campaign every 30 days, but the membership duration is 14, then the audience size for the last 16 days of the duration window is “0”.

Offline Data Provider ID

Optional. The offline data provider ID assigned to your The Trade Desk Events account. Default value: “amperity”. Use the default value if your brand only sends data for first-party measurement. This setting applies only to an Advertiser secret (legacy) credential. An OAuth credential always sends data as the “amperity” offline data provider and ignores this setting.

Merchant ID

Required if The Trade Desk Events has assigned one to your brand. The merchant ID is a numeric platform identifier assigned to retailers who are onboarded to The Trade Desk Events as a Merchant. For example: “11001”.

Note

Brands onboarded to The Trade Desk as a Merchant have access to Product Catalog and event tracking features in The Trade Desk user interface.

Brands not onboarded to The Trade Desk as a Merchant can:

  1. Monetize conversation data for measurement and targeting using the Offline Provider ID.

  2. Request to be onboarded as a Merchant, after which a merchant identifier is assigned.

  3. Send conversion data to the advertiser seat at The Trade Desk for measurement within their own campaigns. Use “amperity” as the value for the Offline Provider ID setting for this use case.

Tracking tag name

The name of the tracking tag for events. Amperity looks up the tracking tag with this name, and creates it when it does not exist. Provide a Tracking tag name or a Tracking tag ID, but not both. A tracking tag name may contain only letters, numbers, and spaces. The name is a string, may have up to 256 characters, must be unique, and may not duplicate any previous advertiser name or offline data provider ID. The tracking tag name appears in the UI for The Trade Desk Events exactly as it is in Amperity.

The Trade Desk Events uses a combination of the tracking tag name, your brand’s advertiser ID, and offline data provider ID to build a unique offline tracking tag ID. Use the offline tracking ID to help measure the success of your brand’s marketing campaigns.

Tracking tag ID

The ID of an existing tracking tag in The Trade Desk. Amperity sends events under this tracking tag without looking it up. Provide a Tracking tag ID or a Tracking tag name, but not both. A tracking tag ID may contain only letters and numbers.

Use a tracking tag ID with an OAuth credential, and when Amperity’s credential cannot manage tracking tags for your account, such as a merchant account that uses its own offline data provider ID.

Create tracking tags in The Trade Desk, and copy the ID from there. Amperity does not show the ID of a tracking tag that it created from a Tracking tag name; find that ID in The Trade Desk.

Step five.

After configuring this destination users may use orchestrations to send query results The Trade Desk Events.

Step six.

Validate the audience with The Trade Desk Events by using a sample audience with a very small membership. For example: 10 or 100 members or the minimum audience size recommended by The Trade Desk Events. Send the sample audience to The Trade Desk Events and verify the sample audience is correct in The Trade Desk Events. Make adjustments if necessary. Only send full audiences after validation is complete.

Build a query

Use a query to build a combinations of data from your Customer 360 database tables that best represent the set of events that your brand wants to use within The Trade Desk Events.

Tip

Send events to The Trade Desk Events as soon as possible, ideally, within 1 to 3 days of the transaction date and avoid sending data older than 25 days.

You can send events to The Trade Desk Events to support your brand’s use cases.

A query that returns a collection offline event is similar to:

1SELECT
2  c360.amperity_id
3  ,c360.email AS email
4  ,uit.order_datetime AS timestamp
5FROM Unified_Itemized_Transactions uit
6LEFT JOIN Customer_360 c360 ON uit.amperity_id = c360.amperity_id
7WHERE uit.order_datetime > (CURRENT_DATE - interval '25' day)
8GROUP BY amperity_id

The query MUST contain timestamp and at least one of email or phone.

Tip

You may use phone as an alternative to email. When both are present in the same row, Amperity generates a separate event for each identifier.

Tip

You may use uid2 as an attribute when Amperity is configured as a UID2 Operator for your brand. A UID2 table must be configured in your customer 360 database.

For example:

1SELECT
2  uid2.uid2
3  ,uit.order_datetime AS timestamp
4FROM Unified_Itemized_Transactions uit
5LEFT JOIN Customer_360 c360 ON uit.amperity_id = c360.amperity_id
6LEFT JOIN (
7  SELECT DISTINCT normalized_email, uid2
8  FROM UID2
9) uid2 ON LOWER(c360.email) = uid2.normalized_email

You may use euid as a source attribute when your brand is a participant in European Unified ID (EUID) .

Caution

Review the list of events parameters that may be sent to The Trade Desk Events. Compare these parameters to the fields that are available from your brand’s customer 360 database to determine which fields are available to be sent to The Trade Desk Events.

Some parameters, such as city, region, which represents a state within the United States, and country, must be associated with the location in which the offline event occurred, not the location at which the customer associated with the offline event resides.

The eventname parameter provides a list of options defined by The Trade Desk Events. Your brand must choose one of the defined options.

Events paramaters

The following table describes each of the parameters that are required by The Trade Desk Events for events. The TD1 - TD10 fields represent the optional fields your brand may include to extend customer profiles to include events.

The fields are listed alphabetically, but may be returned by the query in any order.

Field name

Description

cat

Optional, but Recommended when transaction details are included with events. See item_code, price, and qty.

The name of a product in your product catalog.

This value is most often associated with the Product Category field in the Unified Itemized Transactions table. Include product_category in the SELECT statement.

For example:

,product_category

city

Optional

The name of the city in which the offline event occurred.

country

Optional

The three-letter country code for the country in which the offline event occurred.

Note

Events should only be sent to The Trade Desk Events when they occurred within the United States.

Use a WHERE clause to limit query results to only events that occurred within the United States.

WHERE country = 'USA'

Important

When country is included in offline results, region must also be included.

email

Required unless phone is provided.

The email address that is associated with the offline event.

Note

Amperity converts email addresses to a UID 2.0 value, and then sends them to The Trade Desk Events, after which they are available from within The Trade Desk Events as a UID2 or EUID ID type. Rows without a valid UID 2.0 value or with an empty value are removed by Amperity before sending.

euid

Optional

You may use euid as an attribute when is a participant in European Unified ID (EUID) .

For example:

SELECT
  euid.euid
  ,uit.order_datetime AS timestamp
FROM Unified_Itemized_Transactions uit
LEFT JOIN EUID euid ON uit.amperity_id = euid.euid
WHERE uit.order_datetime > (CURRENT_DATE - interval '25' day)

eventname

Optional, but Required for sending product catalogs alongside events.

An event name groups your brand’s events a specific category type for events as defined by The Trade Desk Events.

The event name that most frequently is associated with events for retail transactions is “purchase”, but the event name may be any of the event names that are described in the following table:

addtocart

A user added an item to the shopping cart.

direction

A user requested and received directions to a physical location for your brand.

login

A user logged in to a site

messagebusiness

A user sent a message to your brand using a form or email.

purchase

Default. A user completed a purchase.

Tip

Recommended for all retail events.

searchcategory

A user searched for a category

searchitem

A user searched for an item.

sitevisit

A user visited a website.

startcheckout

A user started the checkout process.

viewcart

A user viewed the contents of their cart.

viewitem

A user viewed an item.

wishlistitem

A user added an item to a wish list.

item_code

Optional, but Required when transaction details are included with events. See cat, price, and qty.

The unique identifier for a product in your brand’s product catalog.

This value is most often associated with the Product ID field in the Unified Itemized Transactions table. Include product_id in the SELECT statement.

For example:

,product_id

orderid

Recommended

A unique identifier for the transaction. The value for this field is a string with a maximum of 64 characters.

Note

This field should be included with events to help The Trade Desk Events deduplicate conversion events.

This value is most often associated with the Order ID field in the Unified Transactions table. Include order_id in the SELECT statement.

For example:

,order_id

phone

Required unless email is provided.

The phone number associated with the offline event. Phone numbers are normalized to E.164 format and converted to a UID 2.0 value before being sent to The Trade Desk Events.

Note

A row that has both email and phone generates two events, one for each identifier.

This value is most often associated with the Phone field in the Customer 360 table. Include phone in the SELECT statement.

For example:

,c360.phone AS phone

price

Optional, but Recommended when transaction details are included with events. See cat, item_code, and qty.

The price of each item that is associated with an offline event. For example: “$9.99”

This value is most often associated with the Item Price field in the Unified Itemized Transactions table. Include item_price in the SELECT statement.

For example:

,item_price

qty

Optional, but Recommended when transaction details are included with events. See cat, item_code, and price.

The number of items that are associated with an offline event. For example: “10”.

This value is most often associated with the Item Quantity field in the Unified Itemized Transactions table. Include item_quantity in the SELECT statement.

For example:

,item_quantity

region

Optional, but Required when country is included with events.

The region in which the offline event occurred. For the United States, region refers to the state in which the offline event occurred.

Include state and country in the SELECT statement when country is also returned in the query results.

For example:

,country
,state

Tip

Use a WHERE clause to limit query results to only events that occurred in specific states.

WHERE state = 'CA'

storeid

Optional

A unique identifier for the location in which the offline event occurred. For retail transactions, this is most often a unique ID for a store or for a website.

This value is most often associated with the Store ID field in the Unified Transactions table. Include store_id in the SELECT statement.

For example:

,store_id

If you do not need to track events by individual physical stores, you may use a purchase channel to define this value. For example:

,purchase_channel AS store_id

TD1 - TD10

Optional

A series of optional fields that may be used for category or other organization. The value for these fields is a string with a maximum of 64 characters.

timestamp

Required

A field in a database table that has the date and time at which the offline event occurred.

For retail-focused events this is most often the Order Datetime field in the Unified Transactions table, but it may be from a different table depending on your use case or how your brand has configured Amperity. Within the SELECT statement, return Order Datetime, and then rename it to the field name required by The Trade Desk Events.

For example:

,order_datetime AS timestamp

uid2

Optional

You may use uid2 as an attribute when Amperity is configured as a UID2 Operator for your brand.

For example:

SELECT
  uid2.uid2
  ,uit.order_datetime AS timestamp
FROM Unified_Itemized_Transactions uit
LEFT JOIN UID2 uid2 ON uit.amperity_id = uid2.uid2
WHERE uit.order_datetime > (CURRENT_DATE - interval '25' day)

value

Recommended

The monetary value of the offline event to your brand. The value for this field must be a decimal.

Note

This field should be included with events to help The Trade Desk Events deduplicate conversion events.

For retail-focused events this is most often the Order Value field in the Unified Transactions table, but it may be from a different table depending on your use case or how your brand has configured Amperity. Within the SELECT statement, return Order Value, and then rename it to the field name required by The Trade Desk Events.

For example:

,order_value AS value

valuecurrency

Optional

The currency that was associated with the offline event.

For retail-focused events this is most often the Currency field in the Unified Transactions table, but it may be from a different table depending on your use case or how your brand has configured Amperity. Include currency in the SELECT statement.

For example:

,currency