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
Snowplow
Analytics
The leader in Customer Data Infrastructure
Apache-2.0vs mParticle★ 7k
Jitsu
Data Pipelines & ETL
Jitsu is an open-source Segment alternative. Fully-scriptable data ingestion engine for mo
MITvs Segment★ 5.1k
RudderStack
Data Pipelines & ETL
Privacy and Security focused Segment-alternative, in Golang and React
OSSvs Segment★ 4.5k
PostHog
Analytics
PostHog automatically diagnoses problems, fixes bugs, and generates pull requests – all wi
OSSvs Mixpanel★ 40k
Countly
Analytics
Countly is a privacy-first, AI-powered analytics and engagement platform for understanding
OSSvs Mixpanel★ 5.9k
Rakam
Analytics
📈 Collect customer event data from your apps. (Note that this project only includes the A
AGPL-3.0vs Mixpanel★ 790
SaaS alternatives to Trench
See all
mParticle
Analytics
Customer data platform that collects and routes first-party event data
SaaS
Mixpanel
Analytics
Mixpanel is a product analytics platform that tracks user events and adds session replay, experiments, feature flags and AI-generated insights.
SaaS
Amplitude
Analytics
Amplitude is a product analytics platform with session replay, experimentation, feature management and AI tools for understanding and improving digital products.
SaaS
Segment
Data Pipelines & ETL
Customer data platform that collects events and routes them to marketing and analytics tools
SaaS
Tealium
Analytics
Customer data platform and tag management for collecting and routing event data
SaaS
BlueConic
Analytics
Customer data platform that unifies first-party data for personalization and marketing
SaaS

