{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"redocly_category":"Integrations","type":"markdown"},"seo":{"title":"Amazon Ads Conversion Export Integration","description":"Send conversion events from Treasure Data to Amazon Ads for enhanced attribution and measurement using the Amazon Ads Conversion API.","siteUrl":"https://docs.treasuredata.com","lang":"en-US","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"amazon-ads-conversion-export-integration","__idx":0},"children":["Amazon Ads Conversion Export Integration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Amazon Ads Conversion API (CAPI) enables advertisers to send conversion events and customer actions directly from Treasure Data to Amazon Advertising for attribution and measurement purposes. This server-to-server integration bypasses browser limitations and provides more reliable conversion tracking."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Amazon Ads Conversion Export integration supports Treasure Data users in sending conversion events with enhanced privacy compliance and improved attribution accuracy for Amazon DSP and Sponsored Ads campaigns."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"prerequisites","__idx":1},"children":["Prerequisites"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Basic knowledge of Treasure Data"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Basic knowledge of Amazon Ads campaign management and conversion tracking"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Access to Amazon Ads account with conversion API permissions"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Understanding of conversion events and attribution models"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"requirements-and-limitations","__idx":2},"children":["Requirements and Limitations"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["At least one customer identifier must be provided per event"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Maximum batch size: 500 events per request"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Events should be sent as close to real-time as possible for optimal attribution"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["PII fields must be normalized and SHA-256 hashed according to Amazon's requirements; non-PII identifiers follow Amazon's field-specific requirements"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"static-ip-address-of-treasure-data-integration","__idx":3},"children":["Static IP Address of Treasure Data Integration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If your security policy requires IP whitelisting, you must add Treasure Data's IP addresses to your allowlist to ensure a successful connection."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Please find the complete list of static IP addresses, organized by region, at the following ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/apis/endpoints/ip-addresses-integrations-result-workers"},"children":["document"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"use-data-workbench-to-create-a-connection","__idx":4},"children":["Use Data Workbench to Create a Connection"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In Treasure Data, you must create and configure the data connection before running your query. As part of the data connection, you provide authentication to access the integration."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"create-a-new-authentication","__idx":5},"children":["Create a New Authentication"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Your first step is to create a new authentication with a set of credentials."]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Integrations Hub"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Catalog"]},"."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/integrations-hub-catalog.8df5b5674fa8f3c15ebfcca865f1058fb541866c61483999cd59ddb6d527cf95.d34bb0cc.png","alt":"Integrations Hub Catalog"},"children":[]}]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":3},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Search for ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Amazon Ads Conversion"]}," in the Catalog; hover your mouse over the icon and select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create Authentication"]},"."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/create-authentication.088df45cd7f66e73005fd2e9436ac7f52071fda1d7e65e11c9ce900bbf46867e.d34bb0cc.png","alt":"Create Authentication"},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The New Authentication modal displays."]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":4},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Below the OAuth connection field, select the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Click here"]}," link."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Log in to your Amazon account to approve OAuth access."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["On the New Authentication modal, provide this information and select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Continue"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Enter a name for the authentication, and select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Done"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"getting-the-authentication-id","__idx":6},"children":["Getting the Authentication ID"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you want to use this authentication with Treasure APIs or with the TD Toolbelt, you will need to get its Authentication ID."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To get the Authentication ID:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Navigate to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Integrations Hub > Authentications"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select the integration you want to use. The Edit Authentication modal displays."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["In the browser address bar, at the end of the URL, note the Authentication ID."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"define-your-query","__idx":7},"children":["Define your Query"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Navigate to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Data Workbench > Queries"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["New Query"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["From the table drop-down menu, select the database you want to query."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Enter your query."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Here is a sample query:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"sql","header":{"controls":{"copy":{}}},"source":"SELECT   \n  'Product Purchase'                AS event_name,              -- required\n  'OFF_AMAZON_PURCHASES'            AS conversion_type,         -- required\n  'WEBSITE'                         AS event_source,            -- required\n  'US'                              AS country_code,            -- required\n  purchase_time                     AS event_time,              -- required\n  customer_email                    AS email,                   -- conditional (hashed)\n  customer_phone                    AS phone,                   -- conditional (hashed)\n  customer_first_name               AS first_name,              -- conditional (hashed)\n  customer_last_name                AS last_name,               -- conditional (hashed)\n  quantity                          AS units_sold,              -- conditional\n  purchase_value                    AS value,                   -- optional\n  'USD'                             AS currency_code,           -- optional\n  order_id                          AS event_id,                -- optional\n  product_category                  AS custom_field_1,          -- optional custom data\n  customer_segment                  AS custom_field_2           -- optional custom data\nFROM   \n  conversion_events\nWHERE\n  TD_INTERVAL(purchase_time, '-1d', 'JST')\n","lang":"sql"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Here are the required and conditional fields for the query:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Data Type"},"children":["Data Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Hash Required"},"children":["Hash Required"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["event_name"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["STRING"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The name of the conversion event"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["conversion_type"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["STRING"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Must be one of: OFF_AMAZON_PURCHASES, ADD_TO_SHOPPING_CART, APPLICATION, CHECKOUT, CONTACT, LEAD, MOBILE_APP_FIRST_START, PAGE_VIEW, SEARCH, SIGN_UP, SUBSCRIBE, OTHER"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["event_source"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["STRING"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Must be one of: ANDROID, FIRE_TV, IOS, OFFLINE, WEBSITE, MEASUREMENT_ATTRIBUTION_PARTNER"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["country_code"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["STRING"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ISO 3166-1 alpha-2 country code (US, CA, JP, etc.)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["event_time"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["STRING/LONG"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ISO format (YYYY-MM-DDThh:mm:ssTZD) or Unix timestamp"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["email"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Conditional"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["STRING"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Customer email address (SHA-256 hashed)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["phone"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Conditional"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["STRING"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Customer phone number with country code (SHA-256 hashed)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["first_name"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Conditional"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["STRING"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Customer first name (SHA-256 hashed)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["last_name"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Conditional"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["STRING"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Customer last name (SHA-256 hashed)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["address"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Conditional"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["STRING"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Street address (SHA-256 hashed)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["city"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Conditional"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["STRING"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["City name (SHA-256 hashed)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["state"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Conditional"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["STRING"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["State/province (SHA-256 hashed)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["postal"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Conditional"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["STRING"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Postal/zip code (SHA-256 hashed)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["maid"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Conditional"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["STRING"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Mobile advertising ID"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["match_id"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Conditional"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["STRING"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Custom match identifier"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["units_sold"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Conditional"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["LONG"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Only for conversion_type is OFF_AMAZON_PURCHASES"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["value"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["STRING/LONG/DOUBLE"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Conversion value (numeric)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["currency_code"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["STRING"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Only for conversion_type is OFF_AMAZON_PURCHASES. Must be one of: AED, AUD, BRL, CAD, CNY, DKK, EUR, GBP, INR, JPY, MXN, NOK, NZD, SAR, SEK, SGD, TRY, USD"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["event_id"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["STRING"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Unique identifier for deduplication"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["partner"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Conditional"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["STRING"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Required if event_source is MEASUREMENT_ATTRIBUTION_PARTNER"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["amazon_ad_event_key"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Conditional"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["STRING"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Required if event_source is MEASUREMENT_ATTRIBUTION_PARTNER"]}]}]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Customer Identifier Requirements"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["At least one customer identifier field (email, phone, first_name, last_name, address, city, state, postal, maid, or match_id) must be provided. Email or phone number is preferred for best matching accuracy."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"specify-the-result-export-target","__idx":8},"children":["Specify the Result Export Target"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Configure the conversion export settings to send events to Amazon Ads."]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Using the Treasure Console, perform steps 1-4 from the \"Define your Query\" section above."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Export Results"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select the integration you created for Amazon Ads Conversion."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Export Results modal displays."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/export-results-modal-1.a3f175f17f8d00d064e6443a2d926b61b058fc24ec6cc0dee0a92cb277b70e9c.d34bb0cc.png","alt":"Export Results Model Part 1"},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/export-results-modal-2.5cee48b92b0260b172d582a23aef1a67169623a3435502015fe4ee95e92bb20c.d34bb0cc.png","alt":"Export Results Model Part 2"},"children":[]}]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":4},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Enter your information into the fields:"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Note"},"children":["Note"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Region"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Amazon Ads API region for your account"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Required. Options: North America (NA), Europe (EU), Far East (FE)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Advertiser ID"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Your Amazon DSP Advertiser account ID"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Required. Found in your Amazon Ads account settings"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Dataset Name"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Amazon dataset identifier (optional)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional. Used for organizing conversion data in Amazon's system"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Custom Data"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Field mappings for custom event data"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional. Format: field_name: DATA_TYPE (STRING, INTEGER, TIMESTAMP)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Consent Type"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Privacy consent framework to use"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional. Options: TCF, GPP, ACS"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Skip Invalid Records"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Continue processing when encountering invalid data"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional. If disabled, job stops on invalid records"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Skip Error Batches"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Continue processing when batch fails"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional. If disabled, job stops on batch errors"]}]}]}]}]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":5},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Done"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"example-result","__idx":9},"children":["Example Result"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"************* REPORT *************\n2026-04-14 04:34:30.320 +0000 [INFO] (0017:task-0000): ************* REPORT *************\n2026-04-14 04:34:30.320 +0000 [INFO] (0017:task-0000): Total records: 1, total skip records: 0, total batches: 1, total skip batches: 0\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"optional-schedule-query-export-jobs","__idx":10},"children":["(Optional) Schedule Query Export Jobs"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can use Scheduled Jobs with Result Export to periodically write the output result to a target destination that you specify."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure Data's scheduler feature supports periodic query execution to achieve high availability."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When two specifications provide conflicting schedule specifications, the specification requesting to execute more often is followed while the other schedule specification is ignored."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For example, if the cron schedule is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'0 0 1 * 1'"]},", then the 'day of month' specification and 'day of week' are discordant because the former specification requires it to run every first day of each month at midnight (00:00), while the latter specification requires it to run every Monday at midnight (00:00). The latter specification is followed."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"scheduling-your-job-using-treasure-console","__idx":11},"children":["Scheduling your Job Using Treasure Console"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Navigate to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Data Workbench > Queries"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Create a new query or select an existing query."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Next to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Schedule"]},", select None."," ",{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image2021-1-15_17-28-51.f1b242f6ecc7666a0097fdf37edd1682786ec11ef80eff68c66f091bc405c371.0f87d8d4.png","alt":""},"children":[]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In the drop-down, select one of the following schedule options:"," ",{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image2021-1-15_17-29-47.45289a1c99256f125f4d887e501e204ed61f02223fde0927af5f425a89ace0c0.0f87d8d4.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Drop-down Value"},"children":["Drop-down Value"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Custom cron..."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Review ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#custom-cron-details"},"children":["Custom cron... details"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["@daily (midnight)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Run once a day at midnight (00:00 am) in the specified time zone."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["@hourly (:00)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Run every hour at 00 minutes."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["None"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No schedule."]}]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"custom-cron-details","__idx":12},"children":["Custom cron... Details"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image2021-1-15_17-30-23.0f94a8aa5f75ea03e3fec0c25b0640cd59ee48d1804a83701e5f2372deae466c.0f87d8d4.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Cron Value"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Description"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0 * * * *"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Run once an hour."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0 0 * * *"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Run once a day at midnight."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0 0 1 * *"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Run once a month at midnight on the morning of the first day of the month."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["\"\""]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Create a job that has no scheduled run time."]}]}]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":" *    *    *    *    *\n -    -    -    -    -\n |    |    |    |    |\n |    |    |    |    +----- day of week (0 - 6) (Sunday=0)\n |    |    |    +---------- month (1 - 12)\n |    |    +--------------- day of month (1 - 31)\n |    +-------------------- hour (0 - 23)\n +------------------------- min (0 - 59)\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following named entries can be used:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Day of Week: sun, mon, tue, wed, thu, fri, sat."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Month: jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A single space is required between each field. The values for each field can be composed of:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"fixed-table"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"width":"35%","data-label":"Field Value"},"children":["Field Value "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"20%","data-label":"Example"},"children":["Example "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"45%","data-label":"Example Description"},"children":["Example Description "]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A single value, within the limits displayed above for each field."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A wildcard ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'*'"]}," to indicate no restriction based on the field."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'0 0 1 * *'"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Configures the schedule to run at midnight (00:00) on the first day of each month."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A range ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'2-5'"]},", indicating the range of accepted values for the field."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'0 0 1-10 * *'"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Configures the schedule to run at midnight (00:00) on the first 10 days of each month."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A list of comma-separated values ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'2,3,4,5'"]},", indicating the list of accepted values for the field."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'0 0 1,11,21 * *'"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Configures the schedule to run at midnight (00:00) every 1st, 11th, and 21st day of each month."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A periodicity indicator ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'*/5'"]}," to express how often based on the field's valid range of values a schedule is allowed to run."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'30 */2 1 * *'"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Configures the schedule to run on the 1st of every month, every 2 hours starting at 00:30. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'0 0 */5 * *'"]}," configures the schedule to run at midnight (00:00) every 5 days starting on the 5th of each month."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A comma-separated list of any of the above except the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'*'"]}," wildcard is also supported ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'2,*/5,8-10'"]},"."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'0 0 5,*/10,25 * *'"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Configures the schedule to run at midnight (00:00) every 5th, 10th, 20th, and 25th day of each month."]}]}]}]}]}]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["(Optional) You can delay the start time of a query by enabling the Delay execution."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"execute-the-query","__idx":13},"children":["Execute the Query"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Save the query with a name and run, or just run the query. Upon successful completion of the query, the query result is automatically exported to the specified destination."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Scheduled jobs that continuously fail due to configuration errors may be disabled on the system side after several notifications."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["(Optional) You can delay the start time of a query by enabling the Delay execution."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"optional-configure-export-results-in-workflow","__idx":14},"children":["(Optional) Configure Export Results in Workflow"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Within Treasure Workflow, you can specify the use of this integration to export conversion data."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"_export:\n  td:\n    database: td.database\n   \n+ amazon_ads_conversion_export_task:\n  td>: export_conversions.sql\n  database: ${td.database}\n  result_connection: amazon_ads_conversion_auth\n  result_settings:\n    type: amazon_ads_conversion\n    td_authentication_id: td_authentication_id\n    region: NA\n    advertiser_id: advertiser_id\n    dataset_name: conversion_dataset\n    custom_data: product_category:STRING,customer_segment:INTEGER\n    consent_type: ACS\n    amzn_ad_storage: GRANTED\n    amzn_user_data: GRANTED\n    limited_data_use: false\n    skip_invalid_record: true\n    skip_error_batch: false\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"optional-export-integration-using-the-cli","__idx":15},"children":["(Optional) Export Integration Using the CLI"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can also use the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/tools/cli-and-sdks/quickstart"},"children":["TD Toolbelt"]}," to export conversion events to Amazon Ads using the td query command with the --result option."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The data specified with the --result option is in JSON format:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"type\": \"amazon_ads_conversion\",\n  \"td_authentication_id\": \"${authentication_id_from_td_console}\",\n  \"region\": \"NA\",\n  \"advertiser_id\": \"your_advertiser_id\",\n  \"dataset_name\": \"conversion_dataset\",\n  \"custom_data\": \"product_category:STRING,customer_segment:INTEGER\",\n  \"consent_type\": \"ACS\",\n  \"amzn_ad_storage\": \"GRANTED\",\n  \"amzn_user_data\": \"GRANTED\",\n  \"limited_data_use\": false,\n  \"skip_invalid_record\": true,\n  \"skip_error_batch\": false\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"parameters","__idx":16},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Value"},"children":["Value"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Default Value"},"children":["Default Value"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["type"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The destination of the export"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["\"amazon_ads_conversion\""]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["td_authentication_id"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The authentication ID for Amazon Ads authentication in Treasure Console"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["region"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Amazon Ads API region"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["\"NA\", \"EU\", \"FE\""]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["\"NA\""]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["advertiser_id"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Your Amazon DSP Advertiser account ID"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["dataset_name"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Amazon dataset identifier"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["custom_data"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Custom field mappings"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["\"field_name:DATA_TYPE,field_name2:DATA_TYPE\""]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["consent_type"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Privacy consent framework"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["\"TCF\", \"GPP\", \"ACS\""]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Empty"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["tcf"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["TCF consent value"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes if consent_type is \"TCF\""]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["gpp"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["GPP consent value"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes if consent_type is \"GPP\""]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["amzn_ad_storage"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Amazon ad storage consent"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["\"GRANTED\", \"DENIED\""]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes if consent_type is \"ACS\""]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["amzn_user_data"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Amazon user data consent"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["\"GRANTED\", \"DENIED\""]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes if consent_type is \"ACS\""]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["limited_data_use"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Enable limited data use processing"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["true, false"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["false"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["skip_invalid_record"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Continue processing invalid records"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["true, false"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["false"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["skip_error_batch"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Continue processing error batches"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["true, false"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["false"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"usage-examples","__idx":17},"children":["Usage Examples"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Manual export:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td query \\\n--database ${database_name} \\\n--wait \"SELECT * FROM ${conversion_table}\" \\\n--type presto \\\n--result '{\"type\":\"amazon_ads_conversion\",\"td_authentication_id\":\"${auth_id}\",\"region\":\"NA\",\"advertiser_id\":\"${advertiser_id}\",\"dataset_name\":\"conversions\",\"skip_invalid_record\":true}'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Scheduled export:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td sched:create \\\nconversions_to_amazon_ads '0 2 * * *' \\\n--database ${database_name} 'SELECT * FROM ${conversion_table}' \\\n--result '{\"type\":\"amazon_ads_conversion\",\"td_authentication_id\":\"${auth_id}\",\"region\":\"NA\",\"advertiser_id\":\"${advertiser_id}\"}'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"troubleshooting","__idx":18},"children":["Troubleshooting"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"common-issues","__idx":19},"children":["Common Issues"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Authentication errors"]},": Verify OAuth permissions include conversion API access"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Data validation errors"]},": Ensure all required fields are present and at least one customer identifier is provided"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Hash format errors"]},": Customer PII must be properly normalized and SHA-256 hashed following Amazon's guidelines"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Rate limiting"]},": Amazon enforces API rate limits; implement appropriate delays between batch uploads"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Missing customer identifiers"]},": At least one of email, phone, or other PII fields must be provided per event"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"error-handling","__idx":20},"children":["Error Handling"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Error Type"},"children":["Error Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Action"},"children":["Action"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Retry"},"children":["Retry"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Missing required parameters"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Fix configuration, job fails"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Invalid data types"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Fix query, job fails"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["HTTP 4xx errors"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Check API documentation, job fails"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["HTTP 429/5xx errors"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Job retries automatically"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"external-references","__idx":21},"children":["External References"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://advertising.amazon.com/API/docs/en-us/guides/conversions/01-overview"},"children":["Amazon Ads Conversion API Overview"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://advertising.amazon.com/API/docs/en-us/guides/events/events#send-events"},"children":["Amazon Ads Events API Documentation"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://advertising.amazon.com/help/GH2LNLGJUCECRCK2"},"children":["Pass Customer Information through Conversions API"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://advertising.amazon.com/API/docs/en-us/guides/overview"},"children":["Amazon Ads API Onboarding Guide"]}]}]}]},"headings":[{"value":"Amazon Ads Conversion Export Integration","id":"amazon-ads-conversion-export-integration","depth":1},{"value":"Prerequisites","id":"prerequisites","depth":2},{"value":"Requirements and Limitations","id":"requirements-and-limitations","depth":2},{"value":"Static IP Address of Treasure Data Integration","id":"static-ip-address-of-treasure-data-integration","depth":2},{"value":"Use Data Workbench to Create a Connection","id":"use-data-workbench-to-create-a-connection","depth":2},{"value":"Create a New Authentication","id":"create-a-new-authentication","depth":3},{"value":"Getting the Authentication ID","id":"getting-the-authentication-id","depth":3},{"value":"Define your Query","id":"define-your-query","depth":2},{"value":"Specify the Result Export Target","id":"specify-the-result-export-target","depth":2},{"value":"Example Result","id":"example-result","depth":2},{"value":"(Optional) Schedule Query Export Jobs","id":"optional-schedule-query-export-jobs","depth":3},{"value":"Scheduling your Job Using Treasure Console","id":"scheduling-your-job-using-treasure-console","depth":4},{"value":"Custom cron... Details","id":"custom-cron-details","depth":4},{"value":"Execute the Query","id":"execute-the-query","depth":3},{"value":"(Optional) Configure Export Results in Workflow","id":"optional-configure-export-results-in-workflow","depth":2},{"value":"(Optional) Export Integration Using the CLI","id":"optional-export-integration-using-the-cli","depth":2},{"value":"Parameters","id":"parameters","depth":3},{"value":"Usage Examples","id":"usage-examples","depth":3},{"value":"Troubleshooting","id":"troubleshooting","depth":2},{"value":"Common Issues","id":"common-issues","depth":3},{"value":"Error Handling","id":"error-handling","depth":3},{"value":"External References","id":"external-references","depth":2}],"frontmatter":{"seo":{"title":"Amazon Ads Conversion Export Integration","description":"Send conversion events from Treasure Data to Amazon Ads for enhanced attribution and measurement using the Amazon Ads Conversion API."}},"lastModified":"2026-06-01T09:09:59.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/int/amazon-ads-conversion-export-integration","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}