Menu
Instrumentation and self-hosting

Self-Hosted Product Analytics: A Decision Guide for SaaS Teams

Compare managed, self-hosted, and hybrid product analytics across data control, architecture, cost, security, reliability, staffing, and long-term maintenance.

Choose the deployment boundary

“Open source,” “self-hosted,” and “data ownership” describe different decisions. A product can expose source code while relying on managed infrastructure; a self-hosted deployment can still use third-party cloud services; and running a database does not automatically provide portable schemas or a usable analytics product.

Four common operating models
ModelTeam ownsBest fitMain risk
ManagedInstrumentation, identity, taxonomy, privacy choices, analytical useFast learning and limited platform capacityVendor limits, data flow, pricing, and portability
Fully self-hostedCollection through UI, security, upgrades, backups, incidents, supportHard control needs plus existing platform capabilityUnderestimating application and on-call ownership
Warehouse-nativeCanonical events, models, transformations, query cost, analytical experienceTeams with mature warehouse and account modelsWarehouse tables without interactive product workflows
HybridResponsibilities vary by collector, storage, model, UI, or replay layerSpecific boundaries where control and specialization differUnclear contracts, duplicated identity, and split incident ownership

Draw the actual boundary. For each layer, name who operates it, where data moves, how deletion propagates, who receives an alert, and what happens during an upgrade or outage. Hybrid is not one architecture; it is a documented allocation of responsibilities.

The boundary moves; the work does not disappear

Layer

Managed

Fully self-hosted

Warehouse-native

Hybrid

Collection & ingestion

vendor

your team

your team

by contract

Storage & retention

vendor

your team

your team

by contract

Identity & account model

your team

your team

your team

your team

Modeling & taxonomy

your team

your team

your team

your team

Analytical interface

vendor

your team

your team

by contract

Security & privacy controls

shared

your team

your team

shared

Upgrades & backups

vendor

your team

shared

by contract

On-call & incidents

vendor

your team

your team

split — name it

Layers you own

2 of 8
8 of 8
7 of 8
2 + 5 shared

Vendor operates it

Shared — must be written down

Your team operates it

Identity, account model, modeling and taxonomy are yours in every column. No deployment boundary outsources them.

Operational ownership changes with the deployment boundary. The companion comparison table presents the same responsibilities in text.

Understand the complete analytics system

A production system needs more than event storage. Treat the following as one service with explicit data contracts:

  1. Sources: browser, mobile, server, APIs, imports, and optional replay recorder.
  2. Ingestion: authenticated project routing, schema validation, rate limits, batching, and privacy filtering.
  3. Delivery: durable queue or stream, retries, deduplication, ordering rules, timestamps, and backpressure.
  4. Raw evidence: immutable or append-oriented events with retention and deletion support.
  5. Identity: anonymous-to-known users, companies, workspaces, membership history, merges, and impersonation.
  6. Analytical layer: Visits, normalized pages/features, daily or incremental aggregates, and period-level semantic queries.
  7. Serving: query API, cache, dashboards, exports, permissions, and audit logs.
  8. Operations: monitoring, data-quality checks, backups, restoration, deployment, incident response, and upgrades.

Replay may share project, user, Company, and Visit IDs, but its recorder, queue, object storage, privacy controls, retention, and playback failures often deserve a separate pipeline.

One service with explicit contracts, plus a second path for replay

Sources

browsermobileserverAPIsimportsreplay recorder

Ingestion — the gate

project routingschema validationrate limitsbatchingprivacy filtering

Analytical path

Delivery

durable queue, retries, dedup, ordering, backpressure

Raw evidence

append-oriented events, retention, deletion support

Identity

anonymous→known, companies, membership history, merges

Analytical layer

Visits, normalized pages, incremental aggregates, period logic

Serving

query API, cache, dashboards, exports, permissions, audit

Replay path separate pipeline

Recorder queue

its own delivery and backpressure

Object storage

chunked recordings, own retention clock

Playback

masking verified, own failure modes

Shared keys only: project · user · Company · Visit

Applies across everything above

monitoringdata-quality checksbackupsrestoration drillsdeploymentincident responseupgradesgovernance

Storing events in PostgreSQL, ClickHouse or a warehouse delivers the raw-evidence box only — not identity correction, taxonomy, period logic, permissions or an interface people can use safely.

The main analytical path and replay path share identity and Visit context, while governance, observability, retention, and recovery apply across the system.

Design the B2B identity and analytical model

Model stable Users, Companies, workspaces or subaccounts, and time-aware membership. A user may belong to several companies, switch active context, act through support impersonation, or be merged after anonymous use. Preserve company and user IDs on the event when known, plus the membership and attributes needed to interpret history.

{
  "event_id": "evt_01...",
  "occurred_at": "2026-08-04T10:15:00Z",
  "project_id": "project_12",
  "user_id": "user_482",
  "company_id": "company_91",
  "workspace_id": "workspace_7",
  "visit_id": "visit_220",
  "event_name": "report_export_completed",
  "properties": { "report_type": "scheduled" },
  "schema_version": 3
}

Stable IDs are more important than display names. Record membership and company-attribute changes with effective dates when historical analysis needs the context that existed at event time. Label service accounts, bots, staff, test traffic, and impersonated actions.

Maintain a versioned product taxonomy mapping raw routes and events to normalized Pages, grouped features, product areas, and meaningful workflows. Preserve rule history. Moving a feature between areas or changing a meaningful-event rule can create a false trend if the semantic change is invisible.

Use an inspectable intermediate model

An intermediate layer keeps meaning inspectable:

  • Raw events preserve evidence and allow reprocessing.
  • Visits preserve sequence, identity, and session context.
  • Company-period rows support account adoption, breadth, recurrence, and trend.
  • User-period rows support role distribution, penetration, and momentum.
  • Daily aggregates support fast trends, but daily distinct counts must not be summed into monthly uniques.
  • Period-level queries apply current analytical definitions and exact or explicitly approximate distinct logic.

Build for delivery, storage, and query workloads

Event ingestion is a delivery system. Batch efficiently, but preserve event identity and source timestamps. Retries create ambiguity after timeouts, so use stable event IDs and idempotent processing. Decide how late and out-of-order events affect Visits and aggregates. Apply schema validation, authentication, project routing, rate limits, internal-traffic rules, and privacy filtering before uncontrolled data spreads.

Choose storage from workloads rather than fashion:

Different workloads favor different storage patterns
WorkloadTypical needDesign concern
Raw event retentionAppend throughput, partitions, compression, reprocessingDeletion, late events, and payload evolution
Interactive analyticsFast filters, funnels, cohorts, paths, and distinct countsCardinality, concurrency, exactness, and freshness
Identity and metadataTransactions, memberships, rule versions, accessHistory, joins, tenant isolation
ReplayLarge compressed chunks plus searchable metadataSeparate privacy, object lifecycle, and player compatibility
CacheRepeated dashboard resultsInvalidation, project isolation, eviction

Partition and index for actual time, project, Company, User, Visit, event, and property filters. Pre-aggregate common grains incrementally, while retaining a path to exact period-level answers. Approximate distinct functions can serve exploratory work only when the UI labels the trade-off. Test high-cardinality properties and skewed enterprise accounts explicitly.

Own reliability, security, and privacy

Define service indicators across the path: accepted and rejected events, queue age, retry and duplicate rates, late-event delay, transformation failures, Visit completion, aggregate freshness, query latency and errors, cache behavior, export success, deletion backlog, backup age, restoration results, deployment failures, and tenant-isolation tests.

Security responsibilities include encryption in transit and at rest, project and tenant isolation, least privilege, server-side authorization, SSO/MFA where required, audit logs, secret management, environment separation, vulnerability management, dependency updates, backup protection, and incident response. Minimize collection before storage; masking downstream does not undo unnecessary capture.

  • Document recovery time and recovery point objectives.
  • Test restoration, not only backup creation.
  • Authorize every dashboard, export, and replay lookup by project.
  • Propagate retention and deletion through raw events, aggregates, indexes, caches, exports, and backups according to policy.
  • Monitor privacy and taxonomy regressions after releases.
  • Assign an on-call owner and escalation path before launch.

Self-hosting does not guarantee privacy or control. Poorly scoped credentials, broad database access, incomplete deletion, unpatched dependencies, and untested backups can make a self-hosted system less safe than a well-governed managed one.

Calculate capacity and total cost

Total cost includes infrastructure, engineering, analytical UX, data quality, security, privacy, compliance, support, governance, incidents, and opportunity cost. Managed services allocate some of these costs to a subscription; self-hosting makes more of them internal.

The same cost categories, allocated differently

Cost category

Managed

Self-hosted

Infrastructure

subscription
internal

Engineering & on-call

subscriptioninternal
internal

Analytical UX

subscription
internal — often underestimated

Data quality

internal
internal

Security, privacy, compliance

sub.internal
internal

Support & governance

sub.internal
internal

Opportunity cost

internal
internal

Paid through a subscription line

Internal cost — still real, rarely invoiced

Illustrative Team B capacity — planning figures, not guarantees

Events per day

18,000 DAU × 45 events

810,000/day

Peak design baseline

1,500 concurrent × 0.35/s

525events/s

Raw retained, 730 days

650 B × 810k × 730 × 2 copies

769GB

Replay retained, 30 days

1.2 MB × 3,000/day × 30 × 2

216GB

Aggregate rows

4 projects × 20k keys × 6 grains

480,000rows/day

Aggregate rows over 730 days, if every combination is retained

350.4million rows

Every figure above is “before”: add indexes, metadata, queues, temporary space, logs, exports, cache, backups, object versions, compression variance, retries and headroom. Model averages and peaks separately.

Managed and self-hosted models allocate these costs differently; neither removes the need to account for them.
Events per day = active users × events per active user per day

Peak events per second = peak concurrent users × events per active user per second

Raw retained data = compressed event size × events per day × retention days × retained-copy factor

Aggregate rows per day = projects × active entity keys × analytical grains

Replay retained data = compressed recording size × recordings per day × replay retention days × retained-copy factor

These are planning formulas, not guarantees. Add indexes, metadata, queues, temporary space, logs, exports, cache, backups, object versions, compression variance, retries, and headroom. Model averages and peaks separately.

Decide with a production-like pilot and exit plan

Self-hosting is plausible when hard deployment boundaries, long retention, custom account modeling, high customization, predictable scale, and existing data/platform operations justify ownership. Managed analytics is often better when a team needs rapid learning, polished workflows, limited infrastructure responsibility, and no hard requirement ruling out a provider. Warehouse-native and hybrid patterns fit teams with durable internal models but specific UI or replay needs.

Three fictional teams illustrate the fit:

  • Team A: 600 daily users, no data team, early learning. Start managed, keep event and identity contracts portable, and reassess later.
  • Team B: 18,000 daily users, strict data location, custom accounts, long retention, existing platform on-call. Self-hosted or hybrid is strategically plausible after a failure-oriented pilot.
  • Team C: 8,000 daily users and mature warehouse models but limited appetite for another application stack. Warehouse-native structured analytics plus a managed or narrow replay/UI layer is likely.

Test peak ingestion, retries, duplicates, late events, account filters, high-cardinality properties, Visit construction, exact distinct counts, replay, concurrent dashboards, retention, deletion, backup restoration, upgrades, failures, and on-call response.

Plan exit before adoption: raw export, documented schemas, stable IDs, membership history, taxonomy versions, replay compatibility, extension inventory, deletion behavior, parallel run, result-parity tests, rollback, and an owner. A durable event and identity model independent of one UI is the strongest protection against lock-in.

How Hymetry approaches open-source analytics

Hymetry's open-source implementation connects Pages, Companies, Users, and Visits through stable B2B context. The repository allows teams to inspect the application, tracker, and current licensing terms. Open source does not remove the need to operate databases, workers, backups, upgrades, privacy controls, and security.

Review the repository and AGPL terms for the current deployment and modification obligations; this guide does not provide legal advice. Validate the current code, supported infrastructure, migration path, and operating ownership in a production-like environment.

Frequently asked questions

Is open-source product analytics free?

The license may have no subscription fee, but infrastructure, engineering, data quality, security, upgrades, support, and incidents remain costs. Review license obligations separately.

Does self-hosting guarantee data ownership or privacy?

No. Control depends on architecture, credentials, contracts, collection scope, access, retention, deletion, backups, dependencies, and operating discipline.

Can PostgreSQL alone support product analytics?

It can store and query many workloads, but a complete product also needs collection, identity, modeling, performance design, UI, governance, and operations. Scale and query shape determine fit.

When is warehouse-native analytics a better fit?

When the warehouse already holds durable account, user, membership, and business models and the team can build or buy the required interactive experience.

How many events justify self-hosting?

No universal count does. Control requirements, existing capability, query patterns, retention, staffing, and total cost matter more than one volume threshold.

Can daily aggregates be used for longer periods?

For additive measures, often. Do not sum daily distinct users or accounts to get monthly uniques; calculate distinct entities across the complete period or use an explicitly approximate method.

Should events and replay use the same pipeline?

They can share identity and Visit context, but separate queue, storage, retention, privacy, and failure handling are often safer because replay has different volume and sensitivity.

What most reduces lock-in?

Portable raw events, stable IDs, documented schemas, membership history, versioned taxonomy, export, and result-parity tests independent of the presentation layer.

Sources

Source review date: 4 August 2026. Hymetry functionality, documentation, repository route, deployment notes, license, and source URLs were re-verified for publication.

Hymetry and licensing
Collection and event pipelines
Storage, aggregation, and query design
Cost, security, privacy, and replay
Additional references from the original article

About Hymetry

Hymetry is account-centric product intelligence for B2B SaaS. It helps teams understand how customer companies and the users inside them adopt and use their product.