TypeScript · ESM · Tree-shakable

PostHog analytics.
A smaller footprint.

Capture events. Understand sessions. Import the features your app uses, and load them when your app is ready.

Terminal
pnpm add @minihog/core
0 external imports in the event core12 independent entry pointsES2022 without added polyfillsMIT open-source packages

A small, explicit API

Good data starts
with a few lines.

Keep your PostHog project. Send events through its ingestion APIs, with a client you can assemble feature by feature.

Explore the API
analytics.ts
import { createMiniHog } from '@minihog/core';

const analytics = createMiniHog('phc_…', {
  apiHost: 'https://eu.i.posthog.com'
});

analytics.capture('something_good', {
  project: 'your-next-idea'
});
01

Start small.

Events, identity, sessions, and consent. The event core imports no external runtime modules.

@minihog/core
02

Add what you need.

Pageviews, flags, heatmaps, replay, and web vitals each have a separate import.

12 entry points
03

Choose when it starts.

Load analytics after critical content or consent. The Nuxt module supports manual startup through start().

@minihog/nuxt

Try it in your browser

Send an event.
See what goes with it.

The playground shows event properties, identity changes, consent, and flag evaluation. Everything stays in your tab.

Open playground