MiniHog Analytics

Powerful analytics and attribution engine for your applications

Track events, analyze funnels, measure retention, and attribute installs to campaigns. Built for developers who need reliable analytics without the complexity.

Get Started

Everything you need for analytics

Event Tracking

Track any event in your application with simple API calls

Real-time Analytics

View your data in beautiful dashboards with instant updates

Attribution

Understand which campaigns drive installs and conversions

Easy Integration

Simple JavaScript SDK that works with any framework

Documentation

Getting Started

MiniHog is a lightweight analytics backend that helps you track user events, analyze funnels, measure retention, and attribute installs to marketing campaigns.

Quick Start:

  1. Sign up for a free account
  2. Generate your API key
  3. Install the JavaScript SDK
  4. Start tracking events

JavaScript SDK

Install the MiniHog SDK in your application:

npm install minihog-sdk

import MiniHog from 'minihog-sdk';

MiniHog.init({
  environment: 'production', // 'production' | 'sandbox' | 'development'
  apiKey: 'your-api-key'
});

MiniHog.track('app_open');
MiniHog.track('purchase', { amount: 299 });

The SDK automatically uses the correct API endpoint based on the environment. No need to specify the endpoint URL manually.

API Endpoints

POST /track

Track a user event

{
  "event": "purchase",
  "distinct_id": "user_123",
  "properties": {
    "amount": 299
  }
}

POST /click

Record a marketing click for attribution

{
  "device_id": "device_abc",
  "campaign_id": "INSTAGRAM_12"
}

POST /install

Record an install event (triggers attribution)

{
  "device_id": "device_abc"
}

Analytics Queries

GET /analytics/events

Get event counts and unique users

Query params: event, from (YYYY-MM-DD), to (YYYY-MM-DD)

GET /analytics/funnel

Analyze user progression through steps

Query params: steps (comma-separated), from, to

GET /analytics/retention

Measure user retention over time

Query params: cohort, day, from, to

GET /analytics/attribution

View campaign performance and attribution

Attribution Model

MiniHog uses last-click attribution:

  1. When an install event is recorded, the system looks for clicks from the same device_id
  2. Clicks within the attribution window (default: 24 hours) are considered
  3. The most recent click's campaign_id is assigned to the install
  4. The attributed campaign is stored with the install and subsequent events

The attribution window is configurable via ATTRIBUTION_WINDOW_HOURS environment variable.

Ready to get started?

Sign up for free and start tracking events in minutes

Generate API Key