← All 13 Plugins

Metron

Lightweight Analytics

Μέτρον (Métron) — Measure, metric, proportion. From the Delphic maxim "Pan Metron Ariston" (All things in moderation), Métron represents the balance of precise proportion and measurement.

Category: Analytics & SEO Version: 1.0.0 Requirements: PHP 7.4+ · WP 5.8+ Runtime: <1kb beacon · 0 DB locks

Overview

Metron (Greek for measure) provides a high-performance, privacy-focused alternative to Google Analytics. It features a lightweight standalone tracking endpoint, an asynchronous batch-processing queue, and an elegant dashboard—keeping your traffic data entirely on your own server without bogging down your database.

Architectural Rationale: Third-party tracking scripts (Google Analytics) transfer European citizen data to third countries, requiring intrusive cookie banners under the GDPR and ePrivacy Directive. Meanwhile, typical WordPress analytics plugins lock database tables with synchronous INSERT queries on every visit. Metron solves this via an asynchronous <1kb beacon, a sub-20ms SHORTINIT endpoint, and daily-salted IP hashing.

Key Features

  • Zero-Config Privacy Setup

    Activate and track immediately; requires no external cloud accounts or tracking cookies.

  • GDPR Compliant by Default

    Daily rotating cryptographic IP hashing ensures zero personal data is stored (no consent banner required under GDPR/ePrivacy).

  • High-Speed Tracking Endpoint

    Bypasses full WordPress bootstrap overhead via a lightweight standalone beacon (log.php executes in <20ms).

  • Asynchronous Batch Queue

    Buffers hits in memory/transients to write in scheduled atomic batches, preventing database lock contention.

  • Deep Visitor Insights

    Tracks pageviews, unique visitors, entry/exit pages, bounce rates, and precise time-on-page.

  • UTM Campaign Attribution

    Automatically detects and parses utm_source, utm_medium, and utm_campaign query tags.

  • Audience Categorization

    Devices (Desktop, Mobile, Tablet), browsers, operating systems, and country-level geo-location.

  • Live Pulse Activity Feed

    Real-time dashboard monitor of active site visitors.

  • Plausible Importer & CSV Export

    Effortlessly import historical archives from Plausible or export filtered views to CSV.

Technical Specifications

Privacy Standard Cookie-less, ePrivacy & GDPR compliant, daily rotating hash salt
Storage Queue Asynchronous bulk buffer writes, zero database table locking
Ingest Latency SHORTINIT endpoint responds in under 20ms without loading WP core
Multisite Network-wide aggregated traffic view & sub-site leaderboards
Migration 1-Click Plausible Analytics JSON/CSV importer
Database metron_stats, metron_queue, metron_visitors_log

Developer Integration

// Standalone high-speed beacon payload (<1kb overhead)
fetch('/wp-content/plugins/metron/beacon.php', {
    method: 'POST',
    body: JSON.stringify({
        url: window.location.pathname,
        ref: document.referrer,
        screen: screen.width
    }),
    keepalive: true
});
WP-CLI: $ wp metron wipe --force

Deployment Notes

IP hashes are generated with secret salt + current date, rendering cross-day user fingerprinting cryptographically impossible.