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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.