IntegrationsCDPTreasure Data

Treasure Data

Enterprise customer data platform for collecting, unifying, and activating customer data with built-in AI and machine learning capabilities.

Prerequisites

Complete these steps in Treasure Data before configuring Signal.

Access your Treasure Data account

Log in to the Treasure Data console at console.treasuredata.com (US) or console.eu01.treasuredata.com (EU). If you do not have an account, contact your Treasure Data representative.

Determine your region

Your Treasure Data region determines the API endpoint. Check your console URL:

Console URLRegionValue for Signal
console.treasuredata.comUSus
console.eu01.treasuredata.comEUeu
console.ap1.treasuredata.comAsia Pacificap

Create a database

Navigate to Data Workbench > Databases and click New Database. Give it a descriptive name (e.g. datafly_events). This is where your ingested events will be stored.

Create a table

Within your new database, click New Table. Give it a name (e.g. events). The table schema will be created automatically based on the data you ingest. Alternatively, you can predefine columns if you want stricter schema enforcement.

Generate a write-only API key

Navigate to My Settings > API Keys (or Administration > API Keys). Click Create New API Key and select Write-only as the key type. Copy the key immediately.

⚠️

Use a Write-only API key for Signal. This provides the minimum permissions needed for data ingestion and limits the key’s access if compromised.

Configuration

FieldTypeRequiredDescription
api_keysecretYesYour Treasure Data write-only API key. Generated in My Settings > API Keys.
database_namestringYesThe target database name. Must already exist in your Treasure Data account.
table_namestringYesThe target table name within the database. Created automatically if it does not exist.
regionselectYesYour Treasure Data region (us, eu, or ap). Determines the API endpoint.

Signal Setup

Quick Setup

  1. Navigate to Integrations in the sidebar.
  2. Open the Integration Library tab.
  3. Find Treasure Data or filter by CDP.
  4. Click Install, and fill in the required fields with the credentials gathered above.
  5. Click Install Integration to create the integration with a ready-to-use default configuration.

API Setup

curl -X POST http://localhost:8084/v1/admin/integration-catalog/treasure_data/install \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Treasure Data",
    "variant": "default",
    "config": {
      "api_key": "xxxxxxxxxxxxxxxxxxxx",
      "database_name": "datafly_events",
      "table_name": "events",
      "region": "us"
    },
    "delivery_mode": "server_side"
  }'

Event Mapping

Signal events are mapped to Treasure Data records as follows:

Signal EventTreasure Data ConceptNotes
pageTable recordPage view data inserted as a record with URL, title, referrer, and timestamp columns
trackTable recordEvent name and properties inserted as a record with event-specific columns
identifyTable recordUser traits inserted as a record for downstream identity resolution and audience building

All records include a time column (Unix timestamp) that Treasure Data uses for time-based partitioning and querying. Event properties are flattened into individual columns.

Delivery

Events are delivered server-side from your Datafly Signal infrastructure directly to the Treasure Data Postback API. No client-side scripts are loaded for this integration.

Testing

  1. After installing the integration, trigger a test event from your website or via the Signal event API.
  2. In the Treasure Data console, navigate to Data Workbench > Databases and select your database and table.
  3. Run a quick query (SELECT * FROM your_table ORDER BY time DESC LIMIT 10) to verify records were ingested.
  4. In Signal, check the Live Events view to confirm the event was delivered with a 200 response status.

Troubleshooting

SymptomPossible CauseResolution
401 UnauthorizedInvalid API keyRegenerate the API key in Treasure Data My Settings > API Keys and update the integration config
404 Not FoundDatabase does not existCreate the database in Treasure Data Data Workbench > Databases before sending events
403 ForbiddenWrong key typeEnsure you are using a Write-only (or Master) API key, not a Read-only key
Wrong regionRegion mismatchCheck your Treasure Data console URL and ensure the region config matches
Data not appearingIngestion delayTreasure Data may buffer ingested data for a few minutes. Wait and re-query the table

Visit Treasure Data documentation for full API reference and database configuration details.