7,363 open-source and SaaS tools, with GitHub stats refreshed every day.

Trench

Open source

Open-source event tracking and analytics infrastructure built on ClickHouse and Kafka, compatible with the Segment API and deployable as one Docker image.

trench.dev
Trench homepage screenshot
GitHub stars
1.7k
Last commit
5 mo ago
Repository age
2 years
Version
trench-js@0.0.17
Licence
MIT
Self-hosted
Yes

About Trench

Trench is an event tracking system built on Apache Kafka and ClickHouse that aims to handle large event volumes and provide real-time analytics. It was created by the Frigade team to scale its own tracking pipeline, and is meant for developers who want to build product analytics dashboards or collect events for other data uses on infrastructure they control. The README describes it as cookie-free and compliant with GDPR and PECR, with users able to access, correct or delete their data.

It is compatible with the Segment API, supporting Track, Group and Identify calls, and ships as a single production-ready Docker image. A single node can process thousands of events per second, data can be queried in real time, and webhooks connect events to other destinations. A demo shows how to build a basic Google Analytics-style dashboard using Trench and Grafana.

There are two ways to run it. Trench Self-Hosted is the open-source MIT-licensed version, which needs Docker and Docker Compose and recommends at least 4 GB of RAM and 4 CPU cores for production. Trench Cloud is a fully managed serverless offering. Support is available through a Slack community.

Key features

  • Segment-compatible Track, Group and Identify API
  • Single production-ready Docker image
  • Real-time queries on event data
  • Webhooks to other destinations
  • ClickHouse and Kafka based storage
  • Cookie-free tracking with data deletion controls

Good fit for

  • →Building a product analytics dashboard
  • →Replacing a hosted event pipeline with self-managed infrastructure
Tags
analytics
event-tracking
clickhouse
kafka
product-analytics
segment
self-hosted
gdpr

Trench: questions and answers

What is Trench used for?
Trench is open-source event tracking and analytics infrastructure built on ClickHouse and Kafka, compatible with the Segment API and deployable as one Docker image. It is a good fit for building a product analytics dashboard and replacing a hosted event pipeline with self-managed infrastructure.
Is Trench open source?
Yes. Trench is open source under the MIT licence. Its source code is on GitHub at FrigadeHQ/trench and is written mainly in TypeScript.
Is Trench free?
Yes. Trench is open source, so the software itself is free to use. A managed cloud version is also available.
Can I self-host Trench?
Yes. Trench can be self-hosted on your own server or infrastructure.
What is Trench an alternative to?
Trench is an open-source alternative to mParticle, Mixpanel, Amplitude and Segment. Other open-source alternatives to mParticle include Snowplow, Jitsu and RudderStack.
Is Trench actively maintained?
The most recent commit to Trench was on 6 April 2026. The project has 1.7k stars on GitHub.

Open-source alternatives to Trench

See all

SaaS alternatives to Trench

See all