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 StartedEverything 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:
- Sign up for a free account
- Generate your API key
- Install the JavaScript SDK
- 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:
- When an install event is recorded, the system looks for clicks from the same device_id
- Clicks within the attribution window (default: 24 hours) are considered
- The most recent click's campaign_id is assigned to the install
- The attributed campaign is stored with the install and subsequent events
The attribution window is configurable via ATTRIBUTION_WINDOW_HOURS environment variable.