Treasure Data users can use data from a tracking pixel to send events to Treasure Data.


  • Basic knowledge of Treasure Data

Preparing the URL

You must set up authentication and specify a path before you can add the postback that is used by Treasure Data.


Every request must contain authentication information, provided by the special td_write_key URL parameter. The API key can be retrieved from TD Console. It’s recommended to use write-only API key.{database}/{table}?td_format=pixel&td_write_key=XXXYYYZZZZ&...


Specify these two parameters within a path.

  • {database}: specify the destination database name in the URL. Only alphabet, numbers, or _ are allowed.

  • {table}: specify destination table name in URL. only alphabet, numbers, or _ are allowed.

Any URL parameter, except special parameters listed as follows, is considered as a column inside the record.

  • td_format: Specify pixel

  • td_write_key: As described in Authentication.

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

  • td_global_id: If td_global_id=td_global_id in the query string of postback URL is added, then the API adds a column named td_global_id with value of actual td_global_id into the record.

  • td_ip: If td_ip=td_ip in the query string of postback URL is added, then the API adds a column named td_ip with the value of source IP into the record.

  • td_ua: If td_ua=td_ua in the query string of postback URL is added, then the API adds a column named td_ua with the value of actual user-agent into the record.

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

All parameter values are considered as strings, and you cannot change the value type at the ingestion time with a tracking pixel.

For example URL structure would be something like this:{database}/{table}

Use with <img> Tag

Use the URL with an img HTML tag as the postback to Treasure Data.

<img src="{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..." />
  • No labels