---
title: "Better Analytics at Scale with Trackingplan and ClickHouse"
description: "Trackingplan, which tests web, mobile and backend analytics by sampling events sent to tools like Google Analytics and Segment, moved from DynamoDB with PySpark-precomputed statistics to ClickHouse Cloud so it could answer unforeseen ad hoc queries on raw data."
url: "https://swe.quest/articles/better-analytics-at-scale-with-trackingplan-and-clickhouse-fe79c2efef76743f"
canonical: "https://clickhouse.com/blog/trackingplan-web-analytics-with-clickhouse"
source: "ClickHouse"
published: "2024-01-24"
difficulty: "medium"
kind: "Case study"
reading_minutes: 6
tags: ["analytics","databases","multi-tenancy","cloud"]
---

# Better Analytics at Scale with Trackingplan and ClickHouse

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2024-01-24, 6 min read, Case study. Original: [https://clickhouse.com/blog/trackingplan-web-analytics-with-clickhouse](https://clickhouse.com/blog/trackingplan-web-analytics-with-clickhouse)

## Summary

Trackingplan, which tests web, mobile and backend analytics by sampling events sent to tools like Google Analytics and Segment, moved from DynamoDB with PySpark-precomputed statistics to ClickHouse Cloud so it could answer unforeseen ad hoc queries on raw data. After evaluating Snowflake, BigQuery, Redshift and Athena, the team found ClickHouse 20x faster than Athena and cheaper than the pay-per-scan options for a continuous query workload. Materialized views, backfilled via INSERT INTO SELECT, precompute the common dashboard statistics. Customer-ID ordering keys handle multi-tenancy and ad hoc queries across about 30 billion rows growing 400% per year, and Map/Array types hold dynamic properties.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Analytics & OLAP](https://swe.quest/tags/analytics.md) (Data & databases)
- [Databases](https://swe.quest/tags/databases.md) (Data & databases)
- [Multi-tenancy](https://swe.quest/tags/multi-tenancy.md) (Architecture & design)
- [Cloud platforms](https://swe.quest/tags/cloud.md) (Infrastructure)

## Prerequisites

- OLAP databases ([easy posts on Analytics & OLAP](https://swe.quest/tags/analytics.md?difficulty=easy))
- SQL ([easy posts on SQL](https://swe.quest/tags/sql.md?difficulty=easy))

## Keywords

ClickHouse, ClickHouse Cloud, Trackingplan, DynamoDB, Athena, Materialized Views

## Related posts

- [How AdGreetz Processes Millions of Daily Ad Impressions with ClickHouse Cloud](https://swe.quest/articles/how-adgreetz-processes-millions-of-daily-ad-impressions-with-clickhouse-cloud-923fb2f6799d75bf.md): ClickHouse · 2023-04-26 · Easy · 3 min read · Analytics & OLAP, Ads, Cost optimization, Serverless
  AdGreetz moved its ad impression analytics from AWS Athena to Snowflake and then to ClickHouse Cloud, citing roughly six times lower cost than a small Snowflake standard plan and sub-second rather than multi-second queries.
- [Harnessing the Power of Materialized Views and ClickHouse for High-Performance Analytics at Inigo](https://swe.quest/articles/harnessing-the-power-of-materialized-views-and-clickhouse-for-high-performance-ebcfa2d951da7c43.md): ClickHouse · 2023-06-23 · Medium · 8 min read · Analytics & OLAP, Databases, SQL, Performance engineering
  Inigo stores analytics on billions of GraphQL API requests in ClickHouse after rejecting Snowflake as too slow and costly for customer-facing data and lacking a local emulator, and PostgreSQL because its indexes and costs blew up past roughly 100K–1M rows.
- [Why ClickHouse Cloud wins at real-time analytics](https://swe.quest/articles/why-clickhouse-cloud-wins-at-real-time-analytics-ff3bf2806ccb7be7.md): ClickHouse · 2026-10-28 · Medium · 21 min read · Analytics & OLAP, Storage engines, Query engines, Performance engineering, Cost optimization
  In the CostBench streaming benchmark (113.2 billion stock quotes ingested at about 1M rows/s while queries ran), ClickHouse Cloud scored 412× to 1,996× better end-to-end performance per dollar than Snowflake, Databricks, BigQuery and Redshift Serverless.
- [Ongage's Strategic Shift to ClickHouse for Real-time Email Marketing](https://swe.quest/articles/ongage-s-strategic-shift-to-clickhouse-for-real-time-email-marketing-dfca8e1a38de318e.md): ClickHouse · 2023-08-24 · Easy · 7 min read · Analytics & OLAP, MySQL, Databases, Cloud platforms
  Ongage, an email and SMS marketing automation company processing about half a billion messages a day, moved its campaign analytics and automation reporting from a large AWS RDS MySQL cluster (alongside MongoDB and Redshift) to ClickHouse Cloud.
- [Trillabit Utilizes the Power of ClickHouse for Fast, Scalable Results Within Their Self-Service, Search-Driven Analytics Offering](https://swe.quest/articles/trillabit-utilizes-the-power-of-clickhouse-for-fast-scalable-results-within-6137812e3149a41e.md): ClickHouse · 2023-01-30 · Easy · 6 min read · Analytics & OLAP, Databases, Data pipelines
  TrillaBit moved its search-driven BI platform from Apache Solr to ClickHouse after Solr proved weak at high-volume aggregation, compression, SQL maturity and joins, and chose ClickHouse over Snowflake on cost and the ability to self-host.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
