Send offline events to The Trade Desk¶
The Trade Desk is a platform for wide internet advertising and enables the use of UID 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.
Important
Your brand should only send offline events that occurred within the United States to The Trade Desk.
Build a query¶
Use a query to build a combinations of data from your Customer 360 tables that best represent the set of offline events that your brand wants to use within The Trade Desk.
Tip
Send offline 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 offline events to The Trade Desk to support your brand’s use cases.
A query that returns a collection offline event is similar to:
SELECT
c360.amperity_id
,c360.email AS email
,uit.order_datetime AS timestamp
FROM Unified_Itemized_Transactions uit
LEFT JOIN Customer_360 c360 ON uit.amperity_id = c360.amperity_id
WHERE uit.order_datetime > (CURRENT_DATE - interval '25' day)
GROUP BY amperity_id
The query MUST contain the following fields: email and timestamp.
Tip
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)
Caution
Review the list of offline 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.
Offline events paramaters¶
The following table describes each of the parameters that are required by The Trade Desk for offline events. The TD1 - TD10 fields represent the optional fields your brand may include to extend customer profiles to include offline events.
The fields are listed alphabetically, but may be returned by the query in any order.
Field name |
Description |
||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cat |
Optional; Recommended when transaction details are included with offline events. See item_code, name, 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. Within the SELECT statement, return Product Category, and then rename it to the field name required by The Trade Desk. For example: ,product_category AS cat
|
||||||||||||||||||||||||
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 Offline 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 offline events that occurred within the United States. WHERE country = 'USA'
Important When country is included in offline results, region must also be included. |
||||||||||||||||||||||||
Required 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 ID type. Rows that are sent to The Trade Desk that do not have a UID 2.0 value or have an empty value are removed by The Trade Desk. You may use uid2 as an attribute when Amperity is configured as a UID2 Operator for your brand. |
|||||||||||||||||||||||||
eventname |
Optional; Required for sending product catalogs alongside offline events. An event name groups your brand’s offline events a specific category type for offline events as defined by The Trade Desk. The event name that most frequently is associated with offline events for retail transactions is “purchase”, but the event name may be any of the event names that are described in the following table (listed alphabetically):
|
||||||||||||||||||||||||
item_code |
Optional; Required when transaction details are included with offline events. See cat, name, 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. Within the SELECT statement, return Product ID, and then rename it to the field name required by The Trade Desk. For example: ,product_id AS item_code
|
||||||||||||||||||||||||
name |
Optional; Recommended when transaction details are included with offline events. See cat, item_code, price, and qty. The name of a product in your brand’s product catalog. This value is most often associated with the Product Name field in the Unified Itemized Transactions table. Within the SELECT statement, return Product Name, and then rename it to the field name required by The Trade Desk. For example: ,product_name AS name
|
||||||||||||||||||||||||
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 offline 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. Within the SELECT statement, return Order ID, and then rename it to the field name required by The Trade Desk. For example: ,order_id AS orderid
|
||||||||||||||||||||||||
price |
Optional; Recommended when transaction details are included with offline events. See cat, item_code, name, 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. Within the SELECT statement, return Item Price, and then rename it to the field name required by The Trade Desk. For example: ,item_price AS price
|
||||||||||||||||||||||||
qty |
Optional; Recommended when transaction details are included with offline 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. Within the SELECT statement, return Item Quantity, and then rename it to the field name required by The Trade Desk. For example: ,item_quantity AS qty
|
||||||||||||||||||||||||
region |
Optional; Required when country is included with offline events. The region in which the offline event occurred. For the United States, region refers to the state in which the offline event occurred. Within the SELECT statement, return region in the query results when country is also returned in the query results. This is done typically by mapping a column in a database table to region. For example: ,country AS country
,state AS region
Tip Use a WHERE clause to limit query results to only offline 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. Within the SELECT statement, return Store ID, and then rename it to the field name required by The Trade Desk. For example: ,store_id AS storeid
If you don’t need to track offline events by individual physical stores, you may use a purchase channel to define this value. For example: ,purchase_channel AS storeid
|
||||||||||||||||||||||||
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 contains the date and time at which the offline event occurred. For retail-focused offline 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 and/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 offline events to help The Trade Desk deduplicate conversion events. For retail-focused offline 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 and/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 offline 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 and/or how your brand has configured Amperity. Within the SELECT statement, return Currency, and then rename it to the field name required by The Trade Desk. For example: ,currency AS valuecurrency
|