Treasure Data

What Is Treasure Data?

Treasure Data is a customer data platform (CDP) that helps organizations collect, unify, and analyze customer data from multiple sources to create a comprehensive view of their customers. The platform enables businesses to make data-driven decisions by integrating and analyzing data, providing insights for personalized marketing, sales, and customer experience strategies. With robust data integration capabilities, Treasure Data supports various data sources, including mobile apps, websites, CRM systems, and IoT devices. Additionally, it features advanced tools for segmentation, data privacy compliance, and customer journey mapping, making it a valuable asset for enterprises looking to optimize customer engagement.


Product Type: Customer Data Platform
Integration Type: Starter Kit
Event Source Type: Web, Mobile Browser, and Mobile App
Event Scope: Full-Funnel Events


Capabilities

  • Multi-Source Data Collection: MetaRouter collects data from web and mobile applications, CRMs, and other systems, routing it to specified databases and tables in Treasure Data as per the DATABASE_ID and TABLE_ID parameters in the ingestion API. With secure API key authentication and JSON-formatted payloads, it ensures compatibility with Treasure Data's schema requirements. Data mapping includes attributes like messageId, userId, and event, and flattens nested fields (context, traits) for standardized ingestion.
  • Low-Latency Ingestion: Treasure Data's Data Ingestion API supports quick data transfer to Treasure Data, allowing for prompt access to customer information for real-time analysis. Automated routing through the playbook further reduces latency by eliminating manual steps in the data flow.
  • Data Unification: MetaRouter consolidates data from multiple sources, aiding identity resolution in Treasure Data by unifying user data across channels. Playbook mapping aligns incoming data to consistent fields, ensuring cohesive customer profiles within the platform.
  • Attribute Enrichment: By routing detailed attributes (e.g., event, userId, enriched context properties) to Treasure Data, MetaRouter enables deeper segmentation and analysis. Field transformations, such as hashing properties.title to _titleHash, provide additional enrichment options aligned with Treasure Data's data processing capabilities.
  • Automated Data Routing: Using the playbook, MetaRouter automates data flow configurations, enabling efficient data transformations and workflows while optimizing ingestion setup for reduced manual input.

Limitations

  • Near-Real-Time Ingestion: While the Data Ingestion API supports low-latency data transfer, it does not guarantee instantaneous real-time ingestion. There may be minor delays depending on factors such as data volume and processing speed, which should be considered for time-sensitive applications.
  • Batch Size Limitations: The streaming ingest API batch endpoint path has the following limits:
    • 1-500 records
    • 1MB max record size
    • 5MB max batch size
      • If this limit is exceeded, the API will return a 422 error.

Starter Kit Setup Guide

1. Gather Credentials

  • Endpoint: Use the endpoint for your region (US, EU01, Tokyo, Korea, or AP03).
  • API Key: Follow Treasure Data's documentation to generate your API Key.
  • Database ID: The name of your database.
  • Table ID: The name of your table.

2. Add a Treasure Data Integration

  • From the integration library, add a Treasure Data integration. Then, fill out the Connection Parameters:
Connection ParameterDescription
ENDPOINTEndpoint based on your region.
API_KEYAPI key generated from your Treasure Data account.
DATABASE_IDThe name of your database.
TABLE_IDThe name of your table.

3. Configure Event Mapping

  • MetaRouter provides all of the event mappings that Treasure Data integrations typically require. You may add custom events, parameters, or mappings in accordance with Treasure Data's API documentation.

4. Deploy to Pipeline

  • In the Pipelines tab, add your Treasure Data integration.
  • Select the correct integration revision.
  • Click Add Integration to finalize deployment.

Event Mappings

Global

Global mappings will be applied to all events. If your parameter names do not match the Expected Inputs provided, you will need to overwrite the Inputs provided with your own.

Output KeyDescriptionExpected Input
idString: Unique identifier for the message.messageId
user_idString: Unique identifier for the user.userId
previous_idString: Identifier for the previous session or user.previousId
anonymous_idString: An identifier for an anonymous user.anonymousId
original_timestampTimestamp: Timestamp when the original event occurred.originalTimestamp
received_atTimestamp: Time when the event was received by the system.receivedAt
sent_atTimestamp: Timestamp when the data was sent to Treasure Data.sentAt
timestampTimestamp: The primary timestamp for when the event took place.timestamp
integrationsJSON Object: Specifies enabled integrations for the event.integrations
typeString: Type of event being tracked (e.g., track, identify).type
eventString: Name of the event.event
nameString: Name associated with the event or action.name
categoryString: Category of the event or content.category
_titleHashString (MD5 Hash): MD5 hash of the event title.properties.title
context_*Various: Fields within context flattened with a context_ prefix.Spread – flattens context with a context prefix
traits_*Various: Fields within traits flattened with a traits_ prefix.Spread – flattens traits with a traits prefix
properties_*Various: Fields within properties flattened with a properties_ prefix.Spread – flattens properties with a properties prefix

Required & Recommended Identifiers

These identifiers must be mapped to Treasure Data in order for successful user matching to occur. Without these IDs, any events sent to Treasure Data may not be accurately reflected in reporting. For your convenience, required and recommended IDs are mapped as Global parameters to ensure they are added to every event.

AttributeExampleSync Injector Required?
user_iduser_12345No
anonymous_id130161d0-8fee-4167-aa4d-d151eed27c6bNo

Integration Validation

Coordinate with your Treasure Data representative, or use the Treasure Data console, to confirm that events are being received and processed correctly on their backend.