# Product Analytics at Scale: An Event Pipeline Blueprint on

Source: https://hlab.in/blog/product-analytics-pipeline-aws-gcp

[Blog](https://hlab.in/blog) Product Analytics at Scale: An Event Pipeline Blueprint on AWS and GCP

# Product Analytics at Scale: An Event Pipeline Blueprint on AWS and GCP

reading time

2 min

published

14 Jul 2026

industry

B2B SaaS

A reference architecture for product analytics — event collection on Lambda or Cloud Run, streaming through Kinesis or Pub/Sub, and modeling in BigQuery.

Industry

[B2B SaaS](https://hlab.in/industries/saas-platform-engineering)

Topics

[Analytics](https://hlab.in/blog/tag/analytics)

Published

14 Jul 2026

Reading time

2 min

[Let’s talk growth](https://h.hlab.in/contact)

On this page

- [The reference architecture](#the-reference-architecture)
- [Collection: boring, tiny, unbreakable](#collection-boring-tiny-unbreakable)
- [The warehouse is the product](#the-warehouse-is-the-product)
- [What it costs and when to build it](#what-it-costs-and-when-to-build-it)

Every serious product eventually asks the same question: what are users actually doing? Off-the-shelf analytics tools answer it until the day you need to join product events with your own database, price by usage, or feed a partner dashboard. At that point you want an event pipeline you own — and the good news is that the reference architecture is now well-trodden on both AWS and GCP.

## The reference architecture

The shape is the same on either cloud: collect events at a thin API, stream them, land them raw, then model them in a warehouse. Every component is managed and serverless — there is nothing to patch at 2 a.m.

```
flowchart LR
  SDK["Web / Mobile SDK"] --> COL["Collector API<br/>AWS Lambda / Cloud Run"]
  COL --> K["Event Stream<br/>Kinesis / Pub-Sub"]
  K --> LAKE[("Data Lake<br/>S3 / GCS")]
  K --> DF["Stream Processing<br/>Dataflow / Flink"]
  DF --> BQ[("Warehouse<br/>BigQuery / Redshift")]
  LAKE --> BQ
  BQ --> DBT["dbt Models"]
  DBT --> DASH["Dashboards<br/>Looker / Metabase"]

```

_A cloud-agnostic event pipeline: the same shape on AWS and GCP._

## Collection: boring, tiny, unbreakable

The collector is a deliberately dumb endpoint — validate the schema, stamp the server time, push to the stream. On AWS that is API Gateway in front of Lambda; on GCP, Cloud Run. Both scale to zero between bursts and to thousands of requests per second during them, which is exactly the traffic profile analytics has.

- Version every event schema from day one — analytics-v1.page_viewed, not page_viewed.

- Accept batches, and let clients retry: at-least-once beats dropped data; dedupe downstream on event IDs.

- Never block the product on analytics — fire and forget, with a client-side queue.

## The warehouse is the product

Raw events land in the lake for cheap replay; modeled tables live in the warehouse. BigQuery has become the default for teams without a data platform group — no clusters to size, SQL your whole team knows, and dbt turns event soup into documented, tested models for activation, retention, and revenue.

The discipline that separates useful analytics from a swamp is treating models like code: dbt in CI, schema tests on every merge, and one owned definition for each business metric. When “weekly active” means one thing everywhere, dashboards stop being arguments.

## What it costs and when to build it

This stack runs on managed services with generous free tiers — early-stage teams typically pay tens of dollars a month, not thousands. Build it when you first catch yourself exporting CSVs to answer a product question, and definitely before you promise a customer a usage-based invoice. Retrofitting event history is the one thing this architecture cannot do for you.

## Explore more articles

-

B2B SaaS

### The Modern SaaS Growth Stack: From Anonymous Traffic to Qualified Customers

18 min read 28 Oct 2026

[The Modern SaaS Growth Stack: From Anonymous Traffic to Qualified Customers](https://hlab.in/blog/modern-saas-growth-stack-analytics-visitor-identification-gtm)

-

B2B SaaS

### Building with AG-UI: Events, Shared State and Human Approval

2 min read 6 Nov 2026

[Building with AG-UI: Events, Shared State and Human Approval](https://hlab.in/blog/ag-ui-events-human-in-the-loop)

-

B2B SaaS

### Solo Developers Are Starting to Operate Like Agencies. Agents Are the Reason.

5 min read 29 Oct 2026

[Solo Developers Are Starting to Operate Like Agencies. Agents Are the Reason.](https://hlab.in/blog/solo-devs-agencies-with-ai-agents)

## Next stop: a 30-minute call.

Tell us what you are building. A senior lead will tell you honestly what it takes to ship it and take it to market.

[Let’s talk growth](https://h.hlab.in/contact) [Email us](mailto:business@hlab.in)
