- Traffical-native events — the track events your SDKs send. The platform stores them and aggregates them. Zero setup beyond
traffical.track(). - Warehouse-native — SQL queries you write against your own data warehouse (Postgres, BigQuery, Snowflake, Databricks, ClickHouse). Traffical executes them, joins assignments to outcomes, and produces the same per-allocation statistics.
When to use warehouse-native
Use warehouse-native when:- You already have a warehouse as the system of record. You don’t want a second event pipeline to keep in sync.
- The outcomes you care about live in places SDKs don’t see — subscription renewals, support tickets, manual refunds, batch-processed conversions.
- You’re migrating from another experimentation tool. Your assignments are already being written somewhere; Traffical analyses them in place.
- You want SQL-level control over what counts as a conversion (deduplication, joins, filters).
- You’re starting fresh and don’t want to think about a warehouse yet.
- The outcome events are naturally captured by an SDK — clicks, purchases, signups, page views.
The four definition types
Warehouse-native is built on four kinds of definitions. The names are deliberately boring — they describe what they are.| Definition | What it describes |
|---|---|
| Entity | The unit of randomization (User, Company, Device). What kind of thing gets assigned to a variant. |
| Assignment | Where assignments live — SQL that returns one row per (entity, time, policy, allocation). |
| Fact | Where outcomes live — SQL that returns events you want to measure (purchases, signups, ticket creates). |
| Metric | How to aggregate a fact into a number per allocation (conversion rate, sum, count). |
Entity definitions
An entity describes the unit of randomization. The most common is a User keyed onuserId. A B2B platform might have a Company entity keyed on companyId.
Assignment definitions
An assignment definition is the SQL that produces the mapping between an entity and the variant it was assigned to. This is what tells Traffical “user 123 sawtreatment of pricing_test at 10:30am”.
- the entity key (here
user_id) assigned_at— when the assignment took effectpolicy_key— must match thekeyof a Traffical policyallocation_key— must match thekeyof one of that policy’s allocations
Fact definitions
A fact definition is SQL that produces outcome events.orders fact above could be aggregated into “revenue per user” (sum of order_total), “conversion rate” (any order), or “order count”.
A fact can also span multiple entities — useful when an event is associated with both a user and a company.
Metric definitions
A metric definition links a fact to an aggregation:| Aggregation | Numerator | Denominator | Output |
|---|---|---|---|
conversion_rate | Unique entities with at least one fact event | Unique entities exposed | Proportion |
sum | Sum of valueColumn across fact events | Unique entities exposed | Per-entity average |
count | Count of fact events | Unique entities exposed | Per-entity rate |
The pipeline
When a metric is configured, Traffical runs a pipeline on a schedule:- Reads assignments (from your warehouse SQL, or from Traffical’s exposure events if SDK-managed)
- Reads facts (from your warehouse SQL, or from Traffical’s track events)
- Joins them by entity key and time
- Computes the per-allocation statistic
- Runs significance tests
- A connection to your warehouse with read access to your source data and read + write access to a Traffical-owned schema (the pipeline writes intermediate tables there)
- The SQL for each definition
Hybrid mode
Most setups end up hybrid:- SDK-managed assignments for new experiments (no SQL to write)
- Warehouse facts for outcomes that live in the warehouse anyway (orders, renewals)
- Traffical-native track events for outcomes the SDK captures naturally (clicks, page views)
SDK → warehouse sync (optional)
If you want your SDK events to land in your warehouse too — for ad-hoc analysis, ML pipelines, or compliance — Traffical can sync exposure and track events into a table you specify. This is configured per project; once it’s on, every event ingested also lands in your warehouse on a regular cadence.Next steps
Decisions & attribution
How decision IDs connect SDK events to assignments.
External-assignments pattern
Migrating from another tool while keeping its assignments.
Optimization
Contextual bandits trained from warehouse data.