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 URL | Region | Value for Signal |
|---|---|---|
console.treasuredata.com | US | us |
console.eu01.treasuredata.com | EU | eu |
console.ap1.treasuredata.com | Asia Pacific | ap |
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
| Field | Type | Required | Description |
|---|---|---|---|
api_key | secret | Yes | Your Treasure Data write-only API key. Generated in My Settings > API Keys. |
database_name | string | Yes | The target database name. Must already exist in your Treasure Data account. |
table_name | string | Yes | The target table name within the database. Created automatically if it does not exist. |
region | select | Yes | Your Treasure Data region (us, eu, or ap). Determines the API endpoint. |
Signal Setup
Quick Setup
- Navigate to Integrations in the sidebar.
- Open the Integration Library tab.
- Find Treasure Data or filter by CDP.
- Click Install, and fill in the required fields with the credentials gathered above.
- 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 Event | Treasure Data Concept | Notes |
|---|---|---|
page | Table record | Page view data inserted as a record with URL, title, referrer, and timestamp columns |
track | Table record | Event name and properties inserted as a record with event-specific columns |
identify | Table record | User 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
- After installing the integration, trigger a test event from your website or via the Signal event API.
- In the Treasure Data console, navigate to Data Workbench > Databases and select your database and table.
- Run a quick query (
SELECT * FROM your_table ORDER BY time DESC LIMIT 10) to verify records were ingested. - In Signal, check the Live Events view to confirm the event was delivered with a
200response status.
Troubleshooting
| Symptom | Possible Cause | Resolution |
|---|---|---|
401 Unauthorized | Invalid API key | Regenerate the API key in Treasure Data My Settings > API Keys and update the integration config |
404 Not Found | Database does not exist | Create the database in Treasure Data Data Workbench > Databases before sending events |
403 Forbidden | Wrong key type | Ensure you are using a Write-only (or Master) API key, not a Read-only key |
| Wrong region | Region mismatch | Check your Treasure Data console URL and ensure the region config matches |
| Data not appearing | Ingestion delay | Treasure 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.