Black Friday at Hostinger: 15% off yearly and longer plans with BFVPS15, until 6 Dec. See plans

Black Friday: 15% off hosting with BFVPS15

Open Source Alternatives
  • Alternatives
  • Categories
    Categories by size1,387 projects
    • Developer Tools672
    • AI & Machine Learning548
    • Business & Productivity334
    • Security & Monitoring212
    • Communication & Collaboration167
    • Design & Creative160
    • IT Management159
    • Web Development153
    • DevOps & CI/CD147
    • LLMOps & AI Tooling147
    Browse all 21 categoriesData & Analytics, Cloud & Hosting and 9 more
  • Blog
  • Advertise
SearchNotion, Slack, password manager.../
Submit
Open Source Alternatives
  • Alternatives
    • Developer Tools672
    • AI & Machine Learning548
    • Business & Productivity334
    • Security & Monitoring212
    • Communication & Collaboration167
    • Design & Creative160
    • Browse all 21 categories
  • Blog
  • Advertise
Submit your project

New open source projects by email

The projects we add and every new guide. Free, unsubscribe any time.

Open Source Alternatives LogoOpen Source Alternatives

Handpicked Open Source Alternatives to Paid Softwares

Add Open Source Alternatives as a preferred source on Google

Product

  • Categories
  • Tag
  • Advertise

Resources

  • Blog
  • Collection
  • Submit

Company

  • Privacy Policy
  • Terms of Service
  • Refund Policy
  • Sitemap

Alternatives

  • Claude Code
  • Jira
  • Notion
  • Slack
  • Linear
  • Wispr Flow
  • All alternatives
© 2026 Open Source Alternatives. All rights reserved.
Open SourceAlternatives
Home/Categories/Data & Analytics/Pug
icon of Pug

Pug

Open source alternative to PostHog, Mixpanel, Google Analytics, Amplitude and Heap

  • 111 stars
  • AGPL-3.0
  • Active this month
  • Last commit 17 days ago

Last verified Nov 16, 2026

Track user behavior across web and mobile apps with open-source product analytics you can self-host, with unified profiles and cookieless privacy by default.

Visit websiteGitHub111 starsDeploy on Hostinger
image of Pug
TL;DR

Pug is an open-source product analytics tool that runs on your own servers. It captures events from web, mobile, and server apps and shows them as funnels, retention charts, trends, and user flow maps. When a visitor is identified (signed in), their events merge into one profile. On the web, this happens only after they have consented. It replaces paid tools like Mixpanel and Amplitude. Those tools charge more as your event volume grows. Pug's self-hosted version is free under the AGPL-3.0 license. Best for product and engineering teams that want full control of their data.

Read the full breakdownHide the full breakdownWho it is for, how it works, trade-offs, the quick start and the FAQ
who it's for

Who Pug is for#

Product teams tracking conversion funnels

Build funnels from signup to purchase, see where people drop off, and filter by any property you track. Pug keeps all event data on your servers, so user behavior never reaches a third-party analytics company.

Skip if:

Your product has very low event volume and you have no server experience. A hosted tool like Mixpanel's free tier is easier to set up and covers light usage without infrastructure work.

Startups cutting analytics costs

Once you pass Mixpanel's free limit, the monthly cost can reach hundreds of dollars. Amplitude also charges for events above its free tier. Pug is free to self-host. Running the servers is the tradeoff, but for a team that already has infrastructure, that is easier to manage.

Skip if:

Skip this if you are on a free plan and your volume is low. Setup work does not pay off until paid tiers become a real cost.

Teams with GDPR or privacy requirements

Pug stores all event data on your own servers. It has GDPR erasure built in. One API (application interface) call deletes a person's events, sessions, aliases, and profile from both databases. It is cookieless by default, so nothing is written to the visitor's device before consent.

Skip if:

Your team has no server infrastructure and cannot build one. A hosted analytics tool with a data processing agreement (DPA) may be simpler for compliance.

the problem

The problem it solves#

Product analytics tools give you useful data, but most charge per event once your volume grows. If your product is growing, the cost grows with it. Mixpanel and Amplitude both have free tiers. Once you pass those limits, the bill grows with your usage. Google offers Analytics free of charge, with Analytics 360 as the enterprise product for large companies.

Storing user behavior with a hosted analytics service also means your data lives on servers you do not control. That matters when you work in markets with privacy rules, or when you want to change how the tool works.

how Pug solves it

How it solves it#

Funnels, retention, and trend charts

Pug gives you seven insight types. Trends show any event over time. Funnels track conversion through ordered steps, with the drop-off at each step. Retention shows how many people who did a start event came back in later periods. Segmentation splits a number like signups or revenue by a property. User flow draws paths between events. Top-K lists the most common property values. Map shows one metric per country.

One profile per person

On the web, when a visitor has consented and logs in, their anonymous events merge into their profile. On Android and server, the same user ID becomes one person in Pug. Each profile shows events, sessions, and traits like plan or email, with the person's latest location, device, and browser.

Cookieless tracking by default

Pug counts visitors with a server-side method instead of a cookie, until a visitor consents. That method's salt is deleted every day, so today's visitors cannot be linked to yesterday's. When someone consents, Pug stores an identifier in the browser's local storage for more accurate cross-session tracking.

MCP server for AI tools

Pug includes an MCP server, a way for AI assistants to query your analytics. It can read projects, insights, events, sessions, and profiles, and create or edit dashboards. It sees only what you can see, and cannot delete a person or erase events.

AI crawler reports

Your server reports visits by AI crawlers to Pug, since most crawlers never run JavaScript. It identifies known crawlers like GPTBot, ClaudeBot, and PerplexityBot by company, purpose, and the pages they read. It also flags requests that claim to be GPTBot but fail OpenAI's IP (server address) check.

Tracking libraries for web, mobile, and server

Pug has tracking libraries for web browsers, Android, iOS, React Native, Flutter, Node.js, Go, and Ruby. On a web page, the library captures page views, clicks, scrolls, and form submits without extra code after a single `init()` call.

strengths · trade-offs

Strengths and trade-offs#

Strengths

  • Free to self-host under AGPL-3.0Pug's self-hosted version is free to run on your own servers, including for commercial use inside your team. Changes to a version that you offer over a network must be shared under the same license.
  • Cookieless by defaultPug counts visitors with a server-side method until they consent, and nothing is written to the visitor's device before consent. That count salt is deleted each day, leaving no long-term cross-day trace.
  • Unified profiles across web and mobileOne `identify()` call merges a visitor's anonymous events from your website (after consent), iOS app, Android app, and server into one profile. Mixpanel and Amplitude also offer cross-platform identity, but Pug does it in a self-hosted setup where the profile data never leaves your server.
  • AI assistants can query your analyticsPug's MCP server lets Claude, ChatGPT, or any MCP client ask questions about your analytics in natural language. You can ask which signup source converted best last week, and it queries your data and answers.

Trade-offs

  • -Self-hosting requires several servicesPug needs Postgres, ClickHouse, NATS, and Dragonfly running together. That is four services to install, configure, and keep running. You also run Pug's backend server and workers, and build and serve the dashboard yourself. If you are used to hosted analytics tools where you add a few lines of code to your site and you are done, the setup here is a significant step up.
  • -Very new projectPug was first pushed to GitHub in June 2026, so it is about six months old. Mature alternatives like PostHog have years of community knowledge, more integrations, and broader documentation. With a newer project, you may find gaps in the docs or hit rough edges that an older tool has already smoothed over.
versus alternatives

Pug vs alternatives#

Pug vs Mixpanel

Both tools track events, build funnels, and show retention. Mixpanel is a cloud service with no self-hosting option; Pug is open source and runs on your own servers under AGPL-3.0.

Pick Pug when you want to keep user data on your servers. It also fits when GDPR rules make sending behavior data to a third party difficult. Pick Mixpanel when you want a mature product with years of integrations and no server management.

Pug vs PostHog

Both tools are open source and can run on your own servers, so the comparison is about features.

PostHog brings session replay, feature flags, and A/B testing. PostHog also has an MCP server and cookieless tracking as a setting you can turn on. Pug counts visitors cookieless by default before consent. Pick PostHog when you need session replay, feature flags, or A/B testing. Pick Pug when you want cookieless tracking on by default and do not need those extra features.

Pug vs Amplitude

Amplitude is a cloud-only service. Pug is open source and runs on your own servers.

Pick Pug when you can run your own servers and want to avoid a subscription fee. Pug is free to self-host under AGPL-3.0. Pick Amplitude when you need a polished product with no infrastructure to manage.

install · quick start

Quick start#

bash
Pug's browser tracking library installs from npm.

```bash
npm install @pug-sh/browser
```
tech stack · detected from GitHub

What it's built on#

Languages
Go
Databases
ClickHouse
Messaging
NATS
frequently asked

FAQ#

Is Pug free to use?

Self-hosting Pug is free under the AGPL-3.0 license. You can run it for your own product, including for commercial use inside your team, at no cost. Pug Cloud at app.pug.sh has a free tier up to 100,000 events per month, with paid plans above that.

What do I need to self-host Pug?

Pug requires Postgres, ClickHouse (a column-oriented database for fast analytics queries), NATS (a message queue), and Dragonfly (a cache). The backend runs as Docker containers published to ghcr.io/pug-sh. The dashboard is built separately from its own repository using the Bun build tool and served as static files. Plan for a server with enough memory to run all four services. It is not a one-click deploy; expect setup time if you are starting from scratch. A full guide is at docs.pug.sh.

How does the cookieless tracking work?

Until a visitor consents, Pug counts them with a server-side hash instead of a cookie. That hash's salt is deleted every day, so today's visitors cannot be linked to yesterday's. When a visitor consents, Pug stores an identifier in the browser's local storage for more accurate cross-session tracking. You can wire your existing consent banner to grant consent, stay cookieless, or deny tracking.

Does Pug have session replay?

Pug's own pages list no session replay. PostHog does include session replay as part of its open source version. If you need to watch how a specific user navigated your app, PostHog is the better fit for that need.

How does the MCP server work?

Pug's MCP server lets AI assistants query your analytics. Connect it from Claude's connectors directory or as a custom endpoint in any MCP client. It has tools for reading projects, dashboards, insights, events, sessions, and profiles, plus one tool for creating or editing dashboards. It operates within your existing permissions and cannot delete data.

also worth a look

Similar open-source tools#

Umami

Alternative toGoogle Analytics

Self-hosted analytics for product and marketing teams

  • 40,524 GitHub stars
  • MITLicence MIT

openpanel

Alternative toMixpanel

Open-source analytics with funnels, replay, and self-hosting

  • 7,343 GitHub stars
  • AGPL-3.0Licence AGPL-3.0

Plausible

Alternative toGoogle Analytics

Cookie-free web analytics for privacy-focused teams

  • 29,983 GitHub stars
  • AGPL-3.0Licence AGPL-3.0

PostHog

Alternative toAmplitude

Track events, replay sessions, and run A/B tests, self-hostable

  • 41,309 GitHub stars
  • MITLicence MIT

Matomo

Alternative toGoogle Analytics

Self-hosted Google Analytics alternative, 100% data ownership

  • 22,084 GitHub stars
  • GPL-3.0Licence GPL-3.0

Trench

Alternative toAmplitude

Open source analytics infrastructure powered by ClickHouse

  • 1,666 GitHub stars
  • MITLicence MIT
by category

Open source tools in these categories#

124

Data & Analytics

Firecrawl, ragflow, Worldmonitor
82

Marketing & Growth

agency-agents, MoneyPrinterTurbo, MiroFish
Black Friday offerHostinger

Self-host Pug on a Hostinger VPS

Keep it running 24/7, even when your laptop is off. A Hostinger VPS gives it a server of its own.

  1. 01

    Choose a plan

    Starts from $6.49/mo

  2. 02

    Apply

    15% off yearly and longer plans, until 6 Dec

  3. 03

    Install Pug

    On a server that stays on

  4. 04

    Start building

    Focus on the app, not the server

Deploy on Hostinger

Sponsors

Nuphos

Alternative toConductor

Agent workspace for teams running Claude Code or Codex

  • 841 GitHub stars
  • Apache-2.0Licence Apache-2.0
  • #AI Agents

Jade Hosting

Zero-configuration full stack deploy in any language

Cloud & Hosting

Mercury CLI

Alternative toClaude Code

Open source terminal coding agent with a built-in debugger.

  • 34 GitHub stars
  • Apache-2.0Licence Apache-2.0
Advertise your product

New open source projects by email

The projects we add and every new guide. Free, unsubscribe any time.

Find open source alternatives to paid software

/
  • Claude Code to OpenCode
  • Jira to Windshift
  • Notion to AppFlowy
  • Slack to Mattermost
  • Linear to GitLab
  • Wispr Flow to Handy
  • 1Password to Bitwarden
  • Microsoft To Do to Super Productivity
  • Arc to Zen Browser
  • CapCut to Concat
  • Grok Bot to Rakazo
  • Superhuman to Inbox Zero
  • Discord to Stoat
  • Airtable to AITable
  • Datadog to SigNoz
  • Muse to OpenClaw
  • Railway to Coolify
  • GitHub Copilot to Cline
  • Confluence to Wiki.js
  • Microsoft Teams to Rocket.Chat
  • Zapier to n8n
  • Pinecone to Qdrant
  • Auth0 to Keycloak
  • Contentful to Strapi
  • Claude Code to OpenCode
  • Jira to Windshift
  • Notion to AppFlowy
  • Slack to Mattermost
  • Linear to GitLab
  • Wispr Flow to Handy
  • 1Password to Bitwarden
  • Microsoft To Do to Super Productivity
  • Arc to Zen Browser
  • CapCut to Concat
  • Grok Bot to Rakazo
  • Superhuman to Inbox Zero
  • Discord to Stoat
  • Airtable to AITable
  • Datadog to SigNoz
  • Muse to OpenClaw
  • Railway to Coolify
  • GitHub Copilot to Cline
  • Confluence to Wiki.js
  • Microsoft Teams to Rocket.Chat
  • Zapier to n8n
  • Pinecone to Qdrant
  • Auth0 to Keycloak
  • Contentful to Strapi