Blog

Guides on privacy-first analytics, self-hosting, DuckDB architecture, and moving off Google Analytics.

Connecting Your Analytics to Claude Desktop with MCP

How the Model Context Protocol lets an AI assistant query your own analytics. The tool registry pattern, per-user site scoping, and why the MCP server is a thin proxy rather than a second database client.

Sep 2, 20268 min readRead

Building an AI Analyst: The Tool Registry Pattern

How to give an LLM access to your analytics without letting it near your database. Tool schemas, result envelopes, site scoping, and the size guardrails that keep a wide query from blowing the context budget.

Sep 1, 20269 min readRead

A/B Testing in Web Analytics: Getting Significance Right

Why 'variant B is winning' usually means nothing, how to compute significance for conversion tests, and the two mistakes — peeking and tiny samples — that make most A/B results fiction.

Aug 30, 20268 min readRead

The Best Open-Source Analytics Tools Compared (2026)

An honest side-by-side comparison of Matomo, Plausible, Umami, PostHog, and InsightsTrack — features, storage engines, operational cost, and which to pick for which job.

Aug 28, 202610 min readRead

Why Did Traffic Drop? Joining SERP Data with Your Analytics

Web analytics knows what happened to a page; a SERP API knows what happened in search. Neither explains the link. How to join them into a plain-English cause, and why an honest 'not search' answer matters.

Aug 28, 20268 min readRead

Umami Alternative: Same Simplicity, More Depth

Comparing Umami and InsightsTrack — both lightweight and privacy-first, but differing on heatmaps, Web Vitals, SQL access, and read performance at scale.

Aug 26, 2026Updated Sep 1, 20267 min readRead

Safely Letting Users Run SQL Against Your Analytics

Exposing a SQL editor to users means accepting arbitrary queries. Parse-and-allowlist beats regex blocklists, plus row caps, statement timeouts and per-site scoping that cannot be escaped.

Aug 26, 20268 min readRead

Matomo Alternative: Lighter Self-Hosted Analytics

Comparing Matomo and InsightsTrack — feature breadth vs operational weight, MySQL vs columnar reads, licensing, and when Matomo is still the better fit.

Aug 24, 2026Updated Sep 1, 20268 min readRead

Hot and Cold Storage for Analytics Without a Data Warehouse

Recent data should be fast; old data should be cheap. How to tier analytics storage between a local DuckDB file and Parquet on S3, and query across both in one SQL statement.

Aug 24, 20269 min readRead

Plausible Alternative: When You Need More Than Pageviews

An honest comparison of Plausible and InsightsTrack — simplicity vs depth, heatmaps, SQL access, and the architectural difference between ClickHouse and embedded DuckDB.

Aug 22, 2026Updated Sep 1, 20268 min readRead

Request Coalescing: Fixing the Thundering Herd in Analytics

When a cache key expires, every concurrent request misses at once and fires the same expensive query. Coalescing makes one of them do the work and the rest wait on its promise.

Aug 22, 20266 min readRead

PostHog Alternative: A Lighter Self-Hosted Option (Honest Comparison)

Looking for a PostHog alternative? An honest comparison of features, operational cost, and licensing — including when PostHog is still the right choice.

Aug 20, 20269 min readRead

Storing Third-Party API Keys Safely in a Self-Hosted App

Users paste credentials into your app. How to encrypt them at rest with AES-256-GCM, why the key must never come back to the browser, and what a masked hint is for.

Aug 20, 20267 min readRead

Geographic Analytics Without Storing IP Addresses

You can report country and city without ever persisting an IP address. Resolve at ingest, keep the result, discard the input — and why that one ordering decision changes your compliance position.

Aug 18, 20266 min readRead

Building an Analytics Data Warehouse on a Single Server

How to run a complete analytics warehouse — ingestion, transformation, rollups, tiered storage, and BI — on one machine, and the signals that mean it is time to scale out.

Aug 16, 20268 min readRead

Collecting Heatmap Data Without Drowning Your Database

Click heatmaps generate far more events than pageviews. Coordinate normalisation, scroll-depth milestones instead of continuous tracking, and aggregating early so the raw stream stays affordable.

Aug 16, 20267 min readRead

Integrating Error Tracking With Your Analytics

Connecting Sentry or similar to analytics means credentials, polling and reconciliation. The adapter pattern, HMAC-verified webhooks, and adaptive backoff that does not hammer a quiet project.

Aug 14, 20268 min readRead

Website Analytics Metrics Explained: What Each One Really Means

A reference for the core web analytics metrics — pageviews, sessions, users, bounce and exit rate, engagement, conversion — how each is defined and where each misleads.

Aug 12, 20265 min readRead

Building Scheduled Reports That Do Not Melt Your Server

Everyone wants a Monday morning email. The generation queue, idempotency so a retry does not double-send, and why scheduled reports are the query pattern most likely to take down an instance.

Aug 12, 20267 min readRead

Writing a Tracking Script That Does Not Slow Down the Site

Your tracking script runs on every page of every customer. Size budgets, sendBeacon over fetch, why it must never block rendering, and failing silently when the collector is down.

Aug 10, 20267 min readRead

12 SQL Queries Every Web Analytics Dashboard Needs

Copy-paste DuckDB SQL for the core web analytics metrics — traffic KPIs, top pages, referrers, entry and exit pages, new vs returning, growth, and anomaly detection.

Aug 8, 202613 min readRead

Multi-Tenant Analytics: Isolating Sites Properly

One instance, many sites, many users. Membership tables over ownership columns, enforcing scope in middleware rather than per-route, and why the AI and SQL layers need the same check.

Aug 8, 20268 min readRead

Implementing Data Retention Without Breaking Your Reports

GDPR wants a retention limit; your year-over-year chart wants history. Pre-aggregating before deletion, per-site policies, and the sweep that enforces them without locking the table.

Aug 6, 20267 min readRead

Designing a Real-Time Analytics Pipeline (Without Kafka)

How to build a real-time analytics pipeline on a single node — ingestion, batching, backpressure, freshness budgets, and delivering live dashboards with SSE.

Aug 5, 20267 min readRead

Counting Live Visitors Accurately

'Active now' sounds trivial and is not. Choosing the activity window, why heartbeats beat pageviews, deduplicating across tabs, and keeping the query cheap enough to run every ten seconds.

Aug 4, 20266 min readRead

GDPR-Compliant Web Analytics: What the Rules Actually Require

A practical walkthrough of GDPR and ePrivacy as they apply to web analytics — lawful basis, the cookie rule, data minimisation, transfers, and what self-hosting changes.

Aug 2, 20266 min readRead

Designing a Custom Dashboard Builder

Letting users arrange their own widgets means a layout model, a widget registry and a migration story. What to store, what to compute, and why saved layouts need versioning from day one.

Aug 2, 20267 min readRead

Sessionization Without Cookies

Defining a session when you cannot set a cookie. Daily-rotating identifiers, the 30-minute inactivity rule in SQL, and honest limits on cross-device and cross-day continuity.

Jul 31, 20267 min readRead

Cohort Retention Analysis in SQL: Building the Triangle Chart

How to compute cohort retention from raw events — the classic triangle table, N-day vs unbounded retention, and reading the curve without fooling yourself.

Jul 30, 20267 min readRead

Benchmarking Analytics Queries Honestly

Most published analytics benchmarks are marketing. Cold vs warm cache, realistic data distributions, measuring percentiles not averages, and publishing the harness so people can check.

Jul 29, 20268 min readRead

Click Heatmaps and Scroll Depth: Reading What Users Actually Do

How click, move, and scroll heatmaps are captured and rendered, what rage clicks and dead clicks reveal, and how to act on the patterns without over-reading them.

Jul 28, 20266 min readRead

Designing an Analytics REST API

Date range parsing, a consistent response envelope, cache headers that match your TTLs, and error responses that help a developer without leaking internals.

Jul 27, 20267 min readRead

UTM Parameters: A Complete Guide to Campaign Tracking

What each UTM parameter means, naming conventions that survive scale, common tagging mistakes, and how UTM data flows into attribution reports.

Jul 26, 20265 min readRead

Funnel Analysis: Finding Where Your Users Actually Drop Off

How to build conversion funnels that reveal real drop-off — choosing steps, strict vs loose ordering, attribution windows, segmenting, and avoiding the survivorship traps.

Jul 24, 20266 min readRead

What Is a Good Bounce Rate? (And Why the Metric Misleads You)

How bounce rate is actually calculated, what counts as good by page type, why GA4 changed the definition, and the cases where a high bounce rate is fine.

Jul 22, 20265 min readRead

Privacy-First Database Design for Analytics

How to design an analytics schema that cannot leak personal data — pseudonymous IDs, salt rotation, aggregation at write time, retention windows, and deletion by design.

Jul 20, 20266 min readRead

DuckDB Performance Tuning: Ten Techniques That Work

Practical DuckDB optimization — memory limits, projection and filter pushdown, reading EXPLAIN ANALYZE, join order, Parquet pruning, and when materialization beats views.

Jul 18, 20266 min readRead

SQL Window Functions for Sessionization and Funnel Analysis

How to turn a raw event stream into sessions, paths, and funnels using LAG, SUM OVER, and gap-and-island techniques — with runnable DuckDB SQL.

Jul 16, 202610 min readRead

Event Schema Design: Naming, Properties, and Avoiding Analytics Debt

How to design an analytics event taxonomy that survives three years — naming conventions, property design, versioning, and the anti-patterns that make data unqueryable.

Jul 14, 20267 min readRead

Building an Incremental Sync from PostgreSQL to DuckDB

How to stream new rows from PostgreSQL into DuckDB without duplicates or gaps — keyset cursors, batch checkpointing, backfills, and idempotent restarts.

Jul 12, 20266 min readRead

Using DuckDB in Node.js: A Practical Guide

How to run DuckDB inside a Node.js service — connection handling, parameterized queries, bulk inserts, Parquet, and the mistakes that cause corruption or leaks.

Jul 10, 20267 min readRead

Columnar vs Row Storage: Why OLAP Queries Get 100× Faster

A from-first-principles explanation of columnar storage — how data layout, compression, and vectorized execution combine to make analytical queries dramatically faster.

Jul 8, 20263 min readRead

Designing a Star Schema for Web Analytics Data

How to model pageviews, sessions, and events as facts and dimensions — grain, surrogate keys, slowly changing dimensions, and where to denormalize for a columnar engine.

Jul 6, 202610 min readRead

DuckDB + Parquet: Cheap Cold Storage for Analytics Data

How to tier analytics data between a hot DuckDB table and cold Parquet files on S3 or R2, and stitch them into one queryable view with UNION ALL.

Jul 4, 20264 min readRead

DuckDB vs ClickHouse vs PostgreSQL for Analytics: How to Choose

A practical comparison of DuckDB, ClickHouse, and PostgreSQL for analytical workloads — operational cost, query shape, concurrency, and when each one is the right call.

Jul 2, 20264 min readRead

Monitoring Core Web Vitals (LCP, CLS, INP) From Your Own Analytics

Learn what Core Web Vitals are, the thresholds Google uses, and how to monitor LCP, CLS, and INP from real users with self-hosted, privacy-first analytics.

Jun 29, 20267 min readRead

Why We Built Analytics on PostgreSQL + DuckDB (Architecture Deep-Dive)

A technical deep-dive into the dual-database analytics architecture behind InsightsTrack: PostgreSQL for writes, DuckDB for reads, and how it answers 90-day queries in under 100 ms.

Jun 28, 20263 min readRead

How to Migrate from Google Analytics to Self-Hosted Analytics

A practical, step-by-step guide to migrating off Google Analytics 4 to a self-hosted, privacy-first alternative — without losing tracking or breaking your site.

Jun 28, 20265 min readRead

Cookieless Analytics, Explained: Track Visitors Without Cookies or Consent Banners

What is cookieless analytics and how does it work? Learn how privacy-first tools track visitors with pseudonymous identifiers and no cookies.

Jun 27, 20264 min readRead

How to Self-Host Web Analytics with Docker in 15 Minutes

A step-by-step guide to self-hosting privacy-first web analytics with Docker. Spin up the full stack — database, API, and dashboard — with one command.

Jun 24, 20264 min readRead

The Best Open-Source Google Analytics Alternative (Self-Hosted & Free)

Looking for an open-source, self-hosted alternative to Google Analytics? Here is how InsightsTrack gives you cookieless, privacy-first web analytics you fully own — free forever.

Jun 20, 20265 min readRead