Routing Policy
What goes to ad platforms, CRM, and warehouse by default.
TrackStack routes events based on destination enablement, per-platform event allowlists, and event classification. This policy keeps ad platforms focused on measurable conversions while preserving full fidelity in your warehouse.
Routing layers
flowchart LR
SDK[SDK capture] --> Edge[Edge router]
Edge --> Ads[Ad platforms CAPI]
Edge --> Pixel[Client pixels]
Edge --> WH[Warehouse / Tinybird]
Edge --> CRM[CRM destinations planned]
- SDK — Sends canonical events to edge with identity + context
- Edge — Validates, hashes PII, maps event names, filters by allowlist
- Ad platforms — Meta, Google, LinkedIn, Reddit, TikTok, X, Microsoft, Quora (+ Pinterest/Snap pixels)
- Warehouse — All events logged for analytics (always)
- CRM — Customer.io, HubSpot, Salesforce (planned — docs-only today)
Ad platform routing
An event delivers to an ad platform when all are true:
- Platform is enabled for the API key
- Platform credentials pass validation
- Event is in the platform allowlist (or allowlist is blank = all events)
- Event is not classified warehouse-only unless explicitly allowlisted
Warehouse-only by default
These events do not appear in any platform default allowlist:
RefundChargebackChurned
Route them to warehouse and CRM for revenue ops — not ad optimization.
Product events
The 22 product-extension events (ApiDocsViewed, EmailFinderUsed, etc.) are warehouse-first. They are excluded from §15 default allowlists. Add them per destination only when you have a deliberate ads use case.
Allowlist behavior
| Config state | Behavior |
|---|---|
Blank / missing events array | All 66 canonical events eligible |
| Explicit allowlist | Only listed events deliver to that platform |
| Reset to platform defaults | Applies §15 allowlist for that platform |
| Reset to all events | Clears allowlist (blank = all) |
Existing saved configs with blank allowlists continue to receive all events — no breaking migration.
Domain policy
Before CAPI delivery, the edge checks domain policy on the API key:
- Allow all — Any origin (development-friendly)
- Allowlist — Only listed hostnames may ingest events
Domain policy is independent of event allowlists.
CRM and lifecycle destinations (planned)
| Destination | Status | Typical events |
|---|---|---|
| Customer.io | Planned | SignUp, StartTrial, Churned, CreditsLow |
| HubSpot | Planned | LeadCaptured, SalesQualifiedLead, OpportunityCreated |
| Salesforce | Planned | PipelineQualified, MeetingHeld, OpportunityCreated |
Configure these in docs today; dashboard wiring ships in a future release.
Event quality gates
Before delivery, the edge evaluates:
- Canonical or valid extension event name
- Required fields for the event family
- Identity signals (email, click IDs, externalId)
eventIdpresence for dedup-sensitive platforms
Failed deliveries land in the DLQ with retry. Check Platforms health in the dashboard.
Recommended routing strategy
| Funnel stage | Primary destinations | Secondary |
|---|---|---|
| Awareness | GA4 (page_view), Meta PageView | LinkedIn PageView |
| Interest | Meta Lead, Google generate_lead | LinkedIn Lead |
| Acquisition | Meta CompleteRegistration, Google sign_up | All signup-capable platforms |
| Activation | LinkedIn SQL/opportunity, warehouse | Meta Lead for retargeting |
| Revenue | All purchase-capable platforms | Warehouse for refunds/chargebacks |
| Product | Warehouse only | Enable ads selectively |
Related docs
- Platform mapping — Default allowlists and name mappings
- B2B SaaS events — Full taxonomy
- Event payload — Identity and dedup requirements