Help us shape the future of Go! Take the 2026 Go Developer Survey

d8a

command module
v1.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2026 License: MIT Imports: 4 Imported by: 0

README

d8a.tech logo

d8a.tech: warehouse-native web analytics

Docs Discord PRs Welcome

d8a.tech (pronounced "data tech") is an open source, warehouse-native web analytics pipeline. It receives the GA4 and Matomo tracking protocols, or its own web tracker, builds sessions on the backend, and writes clean, flat tables to BigQuery, ClickHouse or CSV/Parquet files. Run it in your own infrastructure, air-gapped if you need to, or use d8a.tech Cloud.

flowchart LR
    A["GA4 tags (gtag, GTM)<br/>Matomo tracker<br/>d8a web tracker"] --> B["d8a<br/>sessions, attribution,<br/>filters"]
    B --> C["BigQuery<br/>ClickHouse<br/>CSV / Parquet on S3, MinIO, GCS or disk"]
    C --> D["Your BI, SQL<br/>and AI tools"]

Highlights

  • Keep your tracking. d8a speaks the GA4 and Matomo tracking protocols. Duplicate your GA4 requests to d8a and keep GA4 running, redirect them to d8a instead of Google, or switch to the d8a web tracker, a drop-in replacement for gtag.js.
  • Sessions built on the backend. Hits are grouped into sessions server-side, with a configurable inactivity timeout (30 minutes by default) and split rules for campaign changes, user ID changes, maximum duration and maximum events. Each session, with all its events, is written to the warehouse the moment it closes.
  • A flat, documented schema. Events and sessions land as flat columns, ready for reporting, with no UNNEST. Custom parameters can be mapped to their own columns. Every column carries its own documentation, and the schema reference is generated from it.
  • Raw signals included. Click IDs (gclid, gbraid, wbraid, dclid, srsltid, fbclid, msclkid) get dedicated columns, and the full landing URL keeps any other click ID queryable. IP addresses can be stored in full or masked at one of four levels.
  • Attribution and filtering. Source and medium are derived from click IDs, referrers (search, social, email, video and AI assistants) and UTM parameters. Expression-based traffic filters exclude internal traffic or bots, with a test mode.
  • Your storage. Write directly to Google BigQuery or ClickHouse, or to CSV or Parquet files on S3, MinIO, GCS or a local filesystem.
  • Deploy where your policy requires. Run it on-premises or in your own cloud. The --airgapped flag disables built-in outbound integrations.
  • Open source. MIT-licensed, transparent and auditable. Fork it, contribute, or self-host it.

When Data Lands

Sessions are built on the backend. Once a visit has been inactive for the session timeout (30 minutes by default, configurable with sessions.timeout), the session closes and all of its events, plus the finished session columns, are written to your warehouse at once. Every row is final when it arrives.

Who Uses It

d8a runs in production for healthcare and government organizations. For example, GovAnalytics.nl, a whitelabel analytics platform for Dutch government organizations, is built on d8a.

Typical reasons teams choose it:

  • Healthcare. Keep visitor data inside infrastructure you control. d8a.tech signs BAAs.
  • Public sector. Self-hosted or air-gapped deployments, with code your auditors can read.
  • Data teams and ecommerce. Sessionized, flat tables in your own warehouse, instead of rebuilding sessions from GA4's nested BigQuery export.

Capacity

Receivers scale out; session processing runs on a single worker that scales vertically. The production operations guide documents roughly 7,000 requests per second (about 7 billion events a month) on a machine with 16 cores and 30 GB of RAM, and about 100 million events a month on 2 CPUs and 4 GB of RAM.

Open Source and d8a.tech Cloud

This repository is the full collection and processing pipeline. It ships without a reporting UI: bring your own BI tool, or start from the prebuilt Data Studio dashboard.

d8a.tech Cloud runs the same pipeline in the EU. The Cloud Dashboard plan adds a built-in analytics dashboard with goals, funnels and custom reports, plus Ask AI. The Cloud Warehouse plan writes to your own BigQuery or ClickHouse and comes with the prebuilt Data Studio dashboard. See pricing for the free tiers, the support package and Enterprise options.

Screenshots

d8a.tech Cloud only

The built-in dashboard and Ask AI are part of the d8a.tech Cloud Dashboard plan. They are not included in this repository.

d8a.tech Cloud dashboard, dark mode d8a.tech Cloud dashboard, light mode Ask AI building a funnel from the warehouse schema
Dashboard (Cloud only) Dashboard, light mode (Cloud only) Ask AI (Cloud only)
Open source, with your BI tool

These reports are built on d8a data in Data Studio, using the prebuilt Data Studio dashboard.

Overview report Location report Ecommerce report
Overview Location Ecommerce

Running d8a

Cloud

Start for free at app.d8a.tech.

Production setup (Docker)

See the Getting started guide and the production operations guide.

Local development (from source)
  1. Run it.
go run main.go server --config config.dev.yaml
  1. Send a request and wait about 10 seconds for the session to close (the dev config uses a short session timeout).
curl "http://localhost:8080/g/collect?v=2&tid=14&dl=https%3A%2F%2Ffoo.bar&en=page_view&cid=ag9" -X POST
  1. Check the console output to verify events are being processed.

Testing

go test ./...

Documentation

AI Usage Disclaimer

This work is developed with AI assistance, by professional software engineers with more than 10 years of experience in data/analytics space. Every line of code is manually reviewed before it's merged. Vibe-coded PRs made without understanding of the system will be declined.

Contributing

We welcome contributions from the community. Bug fixes and targeted improvements are always appreciated. For larger refactors or architectural changes, we ask that you discuss your ideas with us on Discord or GitHub Issues first. While modern AI tools make it easy to generate extensive code changes, we need to carefully balance the needs of our community and maintain the project's direction.

You may notice some abstractions in the codebase that seem unnecessary. These exist to support our cloud service, which uses alternative implementations in certain areas.

Please ensure contributions are thoughtful and align with our project standards. PRs that appear to be purely AI-generated without human review and consideration may not be accepted. We value quality over quantity and appreciate the time you take to understand our codebase before contributing.

Community

License

MIT. See LICENSE for details.

Documentation

Overview

Package main provides the entry point for the tracker-api service

Directories

Path Synopsis
pkg
bolt
Package bolt provides BoltDB-backed implementations for KV, set, and proto-session I/O primitives.
Package bolt provides BoltDB-backed implementations for KV, set, and proto-session I/O primitives.
cmd
Package cmd provides command line interface for tracker-api
Package cmd provides command line interface for tracker-api
columns
Package columns provides device detector caching functionality
Package columns provides device detector caching functionality
nolint
columns/eventcolumns
Package eventcolumns provides column implementations for event data tracking.
Package eventcolumns provides column implementations for event data tracking.
columns/sessioncolumns
Package sessioncolumns provides column implementations for session data tracking.
Package sessioncolumns provides column implementations for session data tracking.
columnset
Package columnset provides a default columnset for the tracker API.
Package columnset provides a default columnset for the tracker API.
currency
Package currency provides currency conversion interfaces and implementations.
Package currency provides currency conversion interfaces and implementations.
dbip
Package dbip provides columns for the DBIP database.
Package dbip provides columns for the DBIP database.
encoding
Package encoding provides functionality for encoding and decoding data
Package encoding provides functionality for encoding and decoding data
hits
Package hits provides functionality for handling and processing tracking hits
Package hits provides functionality for handling and processing tracking hits
objectstorage
Package objectstorage provides configuration and utilities for object storage operations.
Package objectstorage provides configuration and utilities for object storage operations.
pings
Package pings provides utilities for creating and handling ping tasks.
Package pings provides utilities for creating and handling ping tasks.
properties
Package filter provides event filtering functionality.
Package filter provides event filtering functionality.
protocol
Package protocol defines the interface for different tracking protocol implementations.
Package protocol defines the interface for different tracking protocol implementations.
protocol/ga4
Package ga4 provides GA4 protocol specific column definitions.
Package ga4 provides GA4 protocol specific column definitions.
protocol/matomo
Package matomo provides Matomo protocol specific column definitions.
Package matomo provides Matomo protocol specific column definitions.
protocolschema
Package protocolschema provides an integration between protocol and schema packages
Package protocolschema provides an integration between protocol and schema packages
publishers
Package publishers provides implementations of various publisher strategies
Package publishers provides implementations of various publisher strategies
receiver
Package receiver implements the receiver service.
Package receiver implements the receiver service.
schema
Package schema provides the core data models and types for the tracking system.
Package schema provides the core data models and types for the tracking system.
sessions
Package sessions provides session management functionality for the tracking system.
Package sessions provides session management functionality for the tracking system.
splitter
Package splitter provides session splitting conditions.
Package splitter provides session splitting conditions.
storage
Package storage provides interfaces and implementations for key-value and set storage.
Package storage provides interfaces and implementations for key-value and set storage.
storagepublisher
Package storagepublisher provides an adapter to publish hits to a worker-backed storage.
Package storagepublisher provides an adapter to publish hits to a worker-backed storage.
util
Package util provides utility functions for type conversions and other common operations.
Package util provides utility functions for type conversions and other common operations.
warehouse
Package warehouse provides a set of interfaces and implementations for working with data warehouses.
Package warehouse provides a set of interfaces and implementations for working with data warehouses.
warehouse/bigquery
Package bigquery provides implementation of BigQuery data warehouse
Package bigquery provides implementation of BigQuery data warehouse
warehouse/clickhouse
Package clickhouse provides implementation of Clickhouse data warehouse
Package clickhouse provides implementation of Clickhouse data warehouse
warehouse/testutils
Package testutils provides test utilities for the warehouse package.
Package testutils provides test utilities for the warehouse package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL