Data Pipeline for E-commerce Analytics

Data Pipeline for E-commerce Analytics

Mid-size B2C E-commerce•E-commerce•2025•6 weeks

The Problem

A growing e-commerce had data scattered across Shopify, Google Analytics, Facebook Ads, and a custom CRM. Reports were manual and took days. Cross-platform analysis or calculating complex metrics like LTV was impossible.

  • Data in 4 different systems, no unified view
  • Weekly reports required manual CSV exports and Excel merging
  • Impossible to calculate LTV, CAC or other strategic metrics
  • Marketing decisions based on partial or outdated data

Constraints

Timeline: 6 weeks
Budget: Medium budget, focus on quick ROI
Technical:
  • • API rate limits of third-party platforms
  • • Incomplete historical data (some months missing)
  • • Limited internal technical team (1 junior developer)

The Solution

Architecture

Cloud-native data pipeline: Fivetran for ingestion from Shopify/GA/FB Ads → BigQuery as data warehouse → dbt for transformations → Metabase for visualization. Airflow for orchestration and scheduling.

Key Decisions

  • Fivetran for ingestion (no-code, reliable) instead of custom scrapers
  • BigQuery for storage (pay-per-query, scalable, zero maintenance)
  • dbt for data modeling (SQL, version control, testable)
  • Metabase for BI (self-service, doesn't require dedicated data analyst)

Approach

Incremental implementation: week 1-2 = infrastructure setup + first source (Shopify), week 3-4 = add GA and FB Ads + first metrics, week 5-6 = complex dbt models (LTV, cohorts) + team training.

dbt contract test: orders/payments reconciliation must be zero, otherwise the pipeline stops
-- dbt contract test: blocks the pipeline if not zero
select
    date_trunc('day', o.created_at) as day,
    count(*)                        as orders,
    count(*) - count(p.payment_id)  as missing_payments  -- = 0
from {{ ref('stg_orders') }} o
left join {{ ref('stg_payments') }} p using (order_id)
group by 1
having count(*) - count(p.payment_id) != 0

Measurable Results

from 2 days to real-time
Report time reduced

Automated dashboards updated hourly

LTV, CAC, ROI now available
Strategic metrics

Previously impossible to calculate

+40% decision speed
Data-driven decisions

Estimated by stakeholders, reduced time-to-insight

Proxy metric
+15% in 3 months
Marketing ROI

Campaign optimization thanks to better data

Overall Impact

The marketing team now makes decisions based on real-time and complete data. They identified 3 high-LTV customer segments previously ignored, and optimized ad budget by cutting non-performing channels. Pipeline ready for ML/predictive analytics.

My Role

  • End-to-end data pipeline architecture design
  • Fivetran connectors and BigQuery setup
  • Data modeling with dbt (schema, transformations, tests)
  • Metabase dashboard creation with strategic KPIs
  • Team documentation and training
  • Monitoring and alerting setup

Want similar results for your project?