Prompt
I'm building a DTC stack and want customer data to flow from Shopify, Klaviyo, and ads into one place. What architecture makes sense?
Latest observation
A good default architecture for a DTC stack is:
Sources → reverse ETL / ingestion → warehouse → transformation / identity resolution → activation back out
Recommended pattern
1) Collect data from each system
- Shopify: orders, customers, products, refunds, subscriptions
- Klaviyo: email/SMS profiles, events, campaign engagement
- Ads platforms: Meta, Google, TikTok, Pinterest, etc. for spend, clicks, impressions, campaign metadata
Use an ELT/integration layer to pull data into a central warehouse:
- Fivetran, Airbyte, Stitch, Hevo, etc.
2) Land everything in a central warehouse
Use:
- BigQuery, Snowflake, or Redshift
This becomes your system of record for:
- Customer profiles
- Orders and revenue
- Marketing touchpoints
- Attribution-ready event history
- Cohort and LTV analysis
3) Model and unify identities
Run transformations in:
- dbt or similar SQL transformation layer
Build:
customerstableordersfact tableeventstablemarketing_touchestableidentity_maptable
Key step: create a person-level identity graph that maps:
- Shopify customer ID
- Klaviyo profile ID
- Phone
- Ad click IDs where available
- Cookie/device IDs if you track them
You’ll usually want:
- Deterministic matching first: email, phone, customer IDs
- Fuzzy/heuristic matching only if needed and compliant
4) Activate data back to tools
Use the warehouse as the source for:
- Audience syncs back to Meta/Google/Klaviyo
- Lifecycle automation
- Suppression lists
- RFM / LTV-based segments
- Lookalike seeds
- Personalization
You can do this with:
- Hightouch, Census, RudderStack, or custom jobs
Practical reference architecture
Shopify / Klaviyo / Ads / Web Events → Ingestion tools → Warehouse → dbt models → BI / analytics / ML → Reverse ETL → Klaviyo / Ads / CRM / support tools
What makes sense for most DTC brands
Small to mid-market
- Shopify + Klaviyo + Meta/Google
- BigQuery
- Fivetran or Airbyte
- dbt
- Looker Studio / Mode / Hex
- Hightouch or Census
This is usually the simplest scalable setup.
More advanced
Add:
- Event tracking from site/app via Segment/RudderStack
- Consent management
- Server-side tracking to improve attribution
- CDP-style event pipeline
- Data quality checks and alerting
Important design principles
Don’t rely on Klaviyo as the source of truth
Klaviyo is great for messaging and engagement, but it should not be your master customer database. Use the warehouse for that.
Keep raw and modeled data separate
Use layers like:
- Raw
- Staging
- Core
- Marts
This helps with debugging and historical accuracy.
Build for identity resolution early
If you wait too long, you’ll end up with fragmented reporting across email, ads, and ecommerce.
Respect consent and privacy
Make sure:
- You honor opt-in/opt-out preferences
- You manage PII carefully
- You avoid sending restricted data to ad platforms
- You have a clear retention policy
If you want the shortest answer
Use this stack:
Shopify + Klaviyo + ad APIs → Airbyte/Fivetran → BigQuery/Snowflake → dbt → Hightouch/Census
That’s the most common, flexible architecture for unifying DTC customer data.
If you want, I can also sketch:
- a lean startup version,
- a best-practice enterprise version, or
- a specific tool stack based on your budget.