{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"redocly_category":"Products","product_name":"Integration Hub","type":"markdown"},"seo":{"title":"Tracking Pixels","description":"Treasure Data Product Documentation · Collect and Unify · Segment and Activate · Experiment and Analyze · Decisioning Automate with AI Scale and Trust.","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":"tracking-pixels","__idx":0},"children":["Tracking Pixels"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure Data users can use data from a tracking pixel to send events to Treasure Data."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Contents"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#prerequisites"},"children":["Prerequisites"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#preparing-the-url"},"children":["Preparing the URL"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#authentication"},"children":["Authentication"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#parameters"},"children":["Parameters"]}]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#use-with-img-tag"},"children":["Use with <img> Tag"]}]}]},{"$$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":"Heading","attributes":{"level":2,"id":"preparing-the-url","__idx":2},"children":["Preparing the URL"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You must set up authentication and specify a path before you can add the postback that is used by Treasure Data."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"authentication","__idx":3},"children":["Authentication"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Every request must contain ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["authentication information"]},", provided by the special ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td_write_key"]}," URL parameter. The API key can be retrieved from Treasure Console. It's recommended to use ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/my-settings/getting-your-api-keys"},"children":["write-only API key"]},"."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"https://in.treasuredata.com/postback/v3/event/{database}/{table}?td_format=pixel&td_write_key=XXXYYYZZZZ&...\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"parameters","__idx":4},"children":["Parameters"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Specify these two parameters within a path."]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{database}"]},": specify the destination database name in the URL. Only alphabet, numbers, or _ are allowed."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{table}"]},": specify destination table name in URL. only alphabet, numbers, or _ are allowed."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Any URL parameter, except special parameters listed as follows, is considered as a column inside the record."]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["td_format"]},": Specify ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pixel"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["td_write_key"]},": As described in Authentication."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["td_record_time"]},": Specify a UNIX timestamp value to set time column in Treasure Data. If it's not specified, the time records that are received are used."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["td_global_id"]},": If ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td_global_id=td_global_id"]}," in the query string of postback URL is added, then the API adds a column named ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td_global_id"]}," with value of actual td_global_id into the record."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["td_ip"]},": If ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td_ip=td_ip"]}," in the query string of postback URL is added, then the API adds a column named ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td_ip"]}," with the value of source IP into the record."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["td_ua"]},": If ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td_ua=td_ua"]}," in the query string of postback URL is added, then the API adds a column named ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td_ua"]}," with the value of actual user-agent into the record."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["td_redirect"]},": The API can redirect to the specified URL. The URL must be encoded. If the td_redirect value includes td_global_id as a parameter, then the API replaces it with an actual value."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["All parameter values are considered as ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["strings"]},", and you cannot change the value type at the ingestion time with a tracking pixel."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For example URL structure would be something like this:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"https://in.treasuredata.com/postback/v3/event/{database}/{table}\n  ?td_format=pixel\n  &td_write_key=XXXYYYZZZZ\n  &td_global_id=td_global_id\n  &td_ip=td_ip\n  &td_ua=td_ua\n  &your_custom_key1=val1\n  &your_custom_key2=val2\n  &your_custom_key3=val3...\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"use-with-img-tag","__idx":5},"children":["Use with <img> Tag"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use the URL with an ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["img"]}," HTML tag as the postback to Treasure Data."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"html","header":{"controls":{"copy":{}}},"source":"<img src=\"https://in.treasuredata.com/postback/v3/event/{database}/{table}?td_format=pixel&td_write_key=XXXYYYZZZZ&td_global_id=td_global_id&td_ip=td_ip&td_ua=td_ua&key1=val1&key2=val2&key3=val3...\" />\n","lang":"html"},"children":[]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Using image tags for tracking in emails is not suggested. This is because emails containing tracking tags from a domain different from the email sender's domain are more likely to be flagged as spam."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Additionally, in recent years, platforms like Apple have started treating open tracking as always open by default, reducing the effectiveness of pixel-based open tracking. Consider a broader marketing strategy that includes directing recipients to landing pages and other engagement methods."]}]}]},"headings":[{"value":"Tracking Pixels","id":"tracking-pixels","depth":1},{"value":"Prerequisites","id":"prerequisites","depth":2},{"value":"Preparing the URL","id":"preparing-the-url","depth":2},{"value":"Authentication","id":"authentication","depth":3},{"value":"Parameters","id":"parameters","depth":3},{"value":"Use with <img> Tag","id":"use-with-img-tag","depth":2}],"frontmatter":{"seo":{"title":"Tracking Pixels"}},"lastModified":"2026-06-01T09:09:59.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/products/customer-data-platform/integration-hub/streaming/tracking-pixels","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}