IntegrationsCDPTreasure AI

Treasure AI

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 AI before configuring Signal.

Access your Treasure AI account

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

Determine your region

Your Treasure AI 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 AI write-only API key. Generated in My Settings > API Keys.
database_namestringYesThe target database name. Must already exist in your Treasure AI account.
table_namestringYesThe target table name within the database. Created automatically if it does not exist.
regionselectYesYour Treasure AI 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 AI under the CDP category.
  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 AI",
    "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 AI records as follows:

Signal EventTreasure AI 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 AI uses for time-based partitioning and querying. Event properties are flattened into individual columns.

Identity

FieldSourceNotes
td_user_iduser_id from datafly.identify()Canonical authenticated identifier.
emailtraits.emailEmail for downstream identity stitching.
td_client_idDatafly anonymous identifierBrowser-scoped first-party identifier.
td_iprequest IPForwarded for geo and bot detection.
td_user_agentrequest user-agentForwarded for device classification.

Treasure AI events should typically be sent under the marketing consent category. Visitors who decline are filtered out by Signal before ingestion, so the table only contains records you are permitted to use.

Delivery

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

Verify it’s working

  1. After installing the integration, trigger a test event from your website or via the Signal event API.
  2. In the Treasure AI 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 Live Events to confirm delivery with a 200 response status.

Troubleshooting

SymptomPossible CauseResolution
401 UnauthorizedInvalid API keyRegenerate the API key in Treasure AI My Settings > API Keys and update the integration config
404 Not FoundDatabase does not existCreate the database in Treasure AI 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 AI console URL and ensure the region config matches
Data not appearingIngestion delayTreasure AI may buffer ingested data for a few minutes. Wait and re-query the table

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

See also