I

Indie Analytics

0/5 (0 ratings) — active installs Updated Nov 4, 2026

Indie Analytics helps you easily integrate privacy-focused, independent analytics tools into your WordPress site.

Supported Analytics Providers:

  • Umami – Privacy-focused, cookie-free alternative to Google Analytics
  • Plausible – Simple, privacy-friendly Google Analytics alternative
  • Swetrix – Privacy-focused web analytics service
  • Matomo – Open-source analytics platform
  • Fathom – Simple analytics for bloggers & businesses
  • Simple Analytics – Privacy-first analytics, no cookies, GDPR/CCPA compliant
  • GoatCounter – Open source, privacy-friendly web analytics (free hosted or self-hosted)
  • Pirsch – Privacy-friendly, cookie-free analytics from Germany (GDPR compliant)
  • Cabin – Privacy-first, carbon-aware web analytics (no cookies, auto-detects domain)
  • Tinylytics – Minimal, privacy-focused analytics with hits, kudos, and uptime monitoring
  • Counter.dev – Simple, open-source, privacy-friendly web analytics (free, donation-supported)

Features

  • Easy integration with multiple indie analytics providers
  • Enable more than one provider at the same time — each runs independently with its own credentials
  • Simple admin interface for configuration
  • Detailed setup instructions for each provider
  • Exclude any combination of WordPress user roles (administrators, editors, authors, custom roles, etc.) from tracking
  • Exclude individual posts/pages from tracking with a one-click meta-box checkbox
  • Exclude URL paths (with * wildcards) globally, e.g. for staging areas or legal pages
  • Fire custom events to every enabled provider with a single PHP helper or shortcode
  • Auto-track outbound link clicks, file downloads, and 404 pages (opt-in per option)
  • Support for custom domains
  • Fast and lightweight

Configuration

  1. Tick the box on any provider card to enable it (you can enable more than one — each runs independently)
  2. For each enabled provider:
    • Enter your Site ID / Tracking ID (or leave blank for providers that auto-detect the domain)
    • Enter the Tracking Script URL (a default is pre-filled for most providers)
    • Optionally, enter a custom domain if you proxy or self-host the script
  3. Tick any user roles you want to exclude from tracking (administrators, editors, authors, contributors, subscribers, or any custom role)
  4. Optionally, enter URL path patterns (one per line) to exclude entire sections of the site — * is a wildcard, e.g. /staging/* or /privacy-policy
  5. Save your settings
  6. To exclude a specific post or page, open it in the editor and tick “Exclude this entry from analytics tracking” in the Analytics Tracking meta box

Provider Setup Instructions

Umami

  1. Create an account on Umami or set up your self-hosted instance
  2. Create a website in your Umami dashboard
  3. Copy the Website ID and Tracking Script URL from your Umami dashboard
  4. Paste these values into the corresponding fields in the plugin settings

Plausible

  1. Create an account on Plausible
  2. Add your website domain in the Plausible dashboard
  3. Your Site ID is your domain name (e.g., example.com)
  4. The Tracking Script URL is https://plausible.io/js/plausible.js
  5. If you use a custom domain for Plausible, enter it in the Custom Domain field

Swetrix

  1. Create an account on Swetrix
  2. Create a new project in the Swetrix dashboard
  3. Copy the Project ID from the installation instructions
  4. The Tracking Script URL is https://swetrix.org/swetrix.js

Matomo

  1. Set up Matomo on your server or create an account on Matomo Cloud
  2. Create a new website in Matomo
  3. Copy the Site ID from the tracking code
  4. The Tracking Script URL is the path to your matomo.js file (e.g., https://example.org/matomo/matomo.js)

Fathom

  1. Create an account on Fathom
  2. Add your website in the Fathom dashboard
  3. Copy the Site ID from the tracking code snippet
  4. The Tracking Script URL is https://cdn.usefathom.com/script.js
  5. If you use a custom domain for Fathom, enter it in the Custom Domain field

Simple Analytics

  1. Create an account on Simple Analytics
  2. Add your website in the Simple Analytics dashboard
  3. Leave the Site ID field blank (Simple Analytics auto-detects your domain), or set it to override the auto-detected hostname (useful for staging/proxied installs)
  4. The Tracking Script URL is https://scripts.simpleanalyticscdn.com/latest.js
  5. If you use a custom domain for Simple Analytics, enter the full script URL in the Custom Domain field

GoatCounter

  1. Create a free account on GoatCounter or set up a self-hosted instance
  2. Your Site ID is your GoatCounter subdomain code (e.g., mysite for mysite.goatcounter.com). For self-hosted installs, enter the full https:// counting endpoint URL (e.g., https://stats.example.com/count) instead
  3. The Tracking Script URL is https://gc.zgo.at/count.js
  4. If you self-host the count.js script, enter the full URL in the Custom Domain field; it will override the Tracking Script URL

Pirsch

  1. Create an account on Pirsch
  2. Add your website domain in the Pirsch dashboard
  3. Copy the Identification Code from the website settings — this is your Site ID
  4. The Tracking Script URL is https://api.pirsch.io/pa.js (swap in https://api.pirsch.io/pa-sd.js to enable session-duration tracking)

Cabin

  1. Create an account on Cabin
  2. Add your website in the Cabin dashboard
  3. Cabin auto-detects your domain — leave the Site ID field blank
  4. The Tracking Script URL is https://scripts.withcabin.com/hello.js
  5. If you proxy Cabin via a custom subdomain, enter the full script URL in the Custom Domain field; it will override the Tracking Script URL

Tinylytics

  1. Create an account on Tinylytics
  2. Add your website in the Tinylytics dashboard to generate a unique Site Code
  3. Copy the Site Code from your embed snippet (the part between /embed/ and .js in the URL) — this is your Site ID
  4. The Tracking Script URL is https://tinylytics.app/embed/ (your Site Code is appended automatically). To proxy Tinylytics, paste the full script URL (ending in .js) into the Custom Domain field and it will be used as-is.

Counter.dev

  1. Create a free account on Counter.dev
  2. Your Site ID is the value used for data-id in the embed snippet (your Counter.dev username/identifier)
  3. The Tracking Script URL is https://cdn.counter.dev/script.js
  4. Set the UTC Offset: leave at 0 for UTC (the default Counter.dev snippet behavior), enter a custom value in hours (e.g. -5 for EST, 5.5 for IST), or choose “Detect from visitor’s browser” to insert a tiny inline script that reads each visitor’s offset at load time
  5. If you proxy Counter.dev via a custom URL, enter the full script URL in the Custom Domain field; it will override the Tracking Script URL

Custom Event Tracking

The plugin can fire custom events to every enabled provider without you having to know each provider’s JavaScript API. There are three ways to trigger an event:

1. PHP helper (template tag)

Call from a theme template or another plugin to fire an event on page load:

<?php lostendfound_indie_analytics_track_event( 'signup-completed' ); ?>

The helper emits a hidden <span data-iaevent="..."> that the front-end dispatcher scans on init and fires through every enabled provider’s adapter. It works from anywhere — header.php, the_content, sidebars, footer — and is safe under strict Content-Security-Policy (script-src 'self') because it never adds an inline <script> tag. In AJAX/REST/cron/WP-CLI contexts the helper returns the markup string but skips echoing it so a JSON response body isn’t corrupted; pass $echo = false to capture markup yourself in any context.

Pass an associative array of properties as the second argument; the dispatcher maps the keys to each provider’s native shape (Plausible reads them as props, Umami / Simple Analytics / Cabin forward them through, Swetrix nests them under meta, Pirsch nests them under options.meta, Fathom keeps _value/_site_id). Matomo reads optional category (defaults to event) and uses url/path as the event label.

<?php lostendfound_indie_analytics_track_event( 'add-to-cart', array( 'category' => 'commerce', 'product' => 'shirt' ) ); ?>

2. Shortcode

Wrap any button, link, or inline element to fire an event when it (or anything inside it) is clicked:

[indie-analytics-event name="cta-clicked"]<a href="/pricing/">See pricing</a>[/indie-analytics-event]

The shortcode renders an inline <span> with a data-iaevent attribute that the dispatcher’s delegated click handler picks up — no inline onclick, so it works on CSP-locked sites. The wrapper auto-promotes to <div> if the inner HTML contains block-level tags (<p>, <h2>, <div>, <ul>, …) so the HTML5 parser doesn’t auto-close the <span> and orphan the data attribute. Force <div> explicitly by passing block="true".

3. Auto-track options

Tick any of these in the Custom Event Tracking section of the settings:

  • Track outbound link clicks — fires Outbound Link events with {url} properties on any anchor whose host differs from the current site (apex/www. pairs match as same-site). Both left-click and middle-click (open-in-new-tab) are caught.
  • Track file downloads — fires Download events with {url} properties on anchors whose URL pathname ends in one of the listed extensions (PDF, ZIP, DOC/X, XLS/X, MP3/4, etc. by default — paste your own comma-, space-, semicolon-, or pipe-separated list to override).
  • Track 404 pages — fires a 404 event with {path} properties when WordPress serves a not-found response.

Programmatic JS API

The dispatcher also exposes a global for inline scripts, custom builds, or third-party integrations:

window.indieAnalytics.track( 'event-name', { /* optional properties */ } );

Provider notes

  • Plausible requires the script variant that exposes the plausible() function for custom events (https://plausible.io/js/script.tagged-events.js, script.manual.js, etc.). The default plausible.js URL does not — change the Tracking Script URL in the provider card if you want custom events.
  • Tinylytics and Counter.dev do not expose a custom-event JS API; their adapters are no-ops, so events fire normally for every other enabled provider while pageview tracking on those two keeps working.

License

This plugin is licensed under the GPL v2 or later.

Credits

Indie Analytics was created to help website owners easily implement privacy-focused analytics tools as alternatives to Google Analytics.