Send events to 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.

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

Caution

This destination is available for sending query results to The Trade Desk after it is configured by a Datagrid Operator or your Amperity representative.

If this destination cannot be selected for orchestrations ask your Datagrid Operator or Amperity representative to configure a destination for sending query results to The Trade Desk.

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.

Tip

Send events to The Trade Desk 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 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. For example:

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

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. 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.

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. Your brand must choose one of the defined options.

Important

Validate the audience with The Trade Desk 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. Send the sample audience to The Trade Desk and verify the sample audience is correct in The Trade Desk. Make adjustments if necessary. Only send full audiences after validation is complete.

Events paramaters

The following table describes each of the parameters that are required by The Trade Desk 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 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, after which they are available from within The Trade Desk 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.

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 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.

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.

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 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.

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