Case study · Data engineering

E-commerce data warehouse: four platforms, one source of truth.

Business data spread across four platforms, pulled together by hand into spreadsheets. We built a centralised warehouse with automated ETL pipelines on Google Cloud: one source of truth for reporting, CAC, LTV and inventory forecasting.

Client
Avea Life, Switzerland
Industry
Health & longevity
Scope
Data engineering · ETL · BI
Engagement
2024 to 2025, 4 months
Architecture: Shopify, Meta Ads, Google Analytics and Klaviyo through Airflow into PostgreSQL and Metabase
Architecture: Shopify, Meta Ads, Google Analytics and Klaviyo through Airflow into PostgreSQL and Metabase
The brief

Four platforms, and reporting done by hand

The challenge

Avea Life is a consumer health and longevity brand selling direct to customers across Europe. Their business data lived in four places at once: Shopify held orders and products, Meta held ad spend and campaign performance, Google Analytics held acquisition behaviour, and Klaviyo held email and retention.

Answering a question that spanned any two of them meant exporting, pasting and reconciling by hand. Reporting was spreadsheet work, and it aged the moment it was finished. The harder problem was that questions like customer acquisition cost and lifetime value require joining those sources reliably, and nobody could be confident the join was right.

Our approach

We started by identifying every source that mattered and what each was the authority for, then designed the ETL architecture around those boundaries rather than around the tools.

Google Cloud Platform was selected for the infrastructure, with the whole stack containerised so it could be maintained and extended without specialist deployment knowledge. Reporting requirements were defined before pipelines were built, so the warehouse schema served the questions the business actually asked.

Throughout, the CAC, LTV and inventory calculations were validated with the Avea team on a near-daily basis. For metrics that drive spending decisions, agreeing the definition matters as much as computing it.

What we built

One warehouse, four sources, automated end to end

A centralised cloud data warehouse on a Google Cloud VM, with every service containerised through Docker for consistent deployment and straightforward maintenance.

On top of that foundation we built the analytics that justified the project: customer acquisition cost and lifetime value across joined Shopify, Meta and Klaviyo data, consolidated campaign reporting, and inventory reconciliation and forecasting.

  1. 01OrchestrationApache Airflow
  2. 02WarehousePostgreSQL
  3. 03BI layerMetabase
  4. 04InfrastructureGoogle Cloud Platform, Docker
  5. 05SourcesShopify, Meta, GA, Klaviyo
  1. 01

    Apache Airflow

    Orchestrates and schedules the ETL workflows: extracting from each source on its own cadence, transforming raw platform exports into analytics-ready tables, and handling ordering and failure between dependent jobs.

  2. 02

    PostgreSQL

    Holds the processed warehouse data as the single source of truth, modelled so that a metric has one definition rather than one per report.

  3. 03

    Metabase

    Provides the reporting layer: dashboards the team could use directly, without going through an analyst or an engineer for routine questions.

The hard parts

Where the work actually was

Reconciling four different models

Shopify, Meta, Google Analytics and Klaviyo each describe a customer differently, attribute differently, and disagree on time zones and currency. Consolidating them meant deciding explicitly which source wins for which fact, and encoding that decision in the transform layer.

ETL that survives a source changing

Platform APIs change, rate-limit and fail intermittently. The pipelines were designed around scheduled, independently retryable jobs with clear dependencies, so one source having a bad morning does not silently corrupt a week of reporting.

Metrics the client would stand behind

CAC and LTV are only useful if the business trusts them. Every definition was agreed with the Avea team as it was built, rather than delivered as a finished number to be argued with afterwards.

The result

Where it landed

All four pipelines were built, tested and ran in production. Reporting that had been manual spreadsheet work became automated, and the business had a single source of truth to ask questions of, including the CAC and LTV figures the team validated with us as they were built.

The platform was handed over to Avea at the end of the engagement, and Avea Life remains a long-term Code Pros client across other work.

  • 4Data sources unifiedShopify, Meta Ads, Google Analytics and Klaviyo into one warehouse.
  • 4 monthsBuild durationDecember 2024 to March 2025, around 310 engineering hours.
  • CAC · LTVClient-validated metricsDefinitions agreed with the Avea team throughout, not handed over as finished numbers.

Reporting still living in spreadsheets?

We design and build data warehouses and ETL pipelines that consolidate your platforms into one source of truth, with metric definitions your team agrees with before they land in a dashboard.

Book a 20-min call