cookieless nginx analytics

    1

    Privacy-first nginx log analytics using HyperLogLog to deduplicate unique visitors without cookies or IP storage.

    Free

    1 useSecurity scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    About this skill

    Most self-hosted dashboards report wrong numbers because they ignore log rotation, fail to filter bots, or incorrectly sum unique visitors over time. Adding daily unique visitors together results in massive overcounting, while simple averages often decline as the measurement period grows. This tool provides a privacy-first way to measure real human traffic directly from nginx access logs without using cookies or third-party trackers.

    What it does

    • Unique visitor estimation uses HyperLogLog sketches to calculate the cardinality of the union across any time window without storing IP addresses.
    • Bot filtering excludes self-declared crawlers to prevent automated traffic from inflating page view counts by up to 15x.
    • Data accumulation solves the 14-day log rotation limit by persisting daily summaries into a non-rotated JSON storage format.
    • GDPR compliance ensures no personal data or IP addresses are retained, using non-reversible probabilistic sketches instead.
    • Multi-window reporting calculates precise statistics for today, yesterday, the last 7 days, and the last 30 days.

    How it works

    1. Configure environment variables for the nginx log path, the target site's URL pattern, and the JSON output destination.
    2. Execute the collection script to process existing logs on disk and rebuild up to 14 days of historical data.
    3. Schedule an hourly cron job to ensure "today's" statistics remain current throughout the day.
    4. Read the JSON output from your frontend or dashboard to display deduplicated visitor counts and page views.

    Frameworks & tools

    The core logic uses Python 3 with the hyperloglog library. It requires access to nginx access_log files, typically found in /var/log/nginx/.

    Why this beats prompting it yourself

    Prompting an AI to count visitors usually results in a simple grep and wc -l script that ignores IP deduplication logic and log rotation. This skill implements specific mathematical sketches (HyperLogLog) that allow you to merge daily data into weekly or monthly totals without overcounting returning users.

    Use cases

    • Replace Google Analytics with a server-side, cookie-free privacy solution.
    • Fix inflated traffic reports caused by aggressive search engine crawlers.
    • Audit actual site reach when monthly log totals seem mathematically impossible.
    • Monitor server-side traffic for GDPR-sensitive applications.

    Known limitations

    This skill only measures HTTP requests recorded in nginx logs. It cannot track client-side interactions like button clicks, scroll depth, or conversion funnels that do not trigger a page load.

    Only measures HTTP requests in nginx logs. Cannot track client-side events like clicks or scroll depth. Historical data is limited to the current log rotation window (usually 14 days) on first run.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    1 use

    Times used to date

    Free forever

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 29 days ago

    • Free with an Agensi account

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Environment Variables
    Listed29 days ago

    What's inside

    Frequently Asked Questions

    Standard log analysis often double-counts the same user across multiple days; this skill uses HyperLogLog algorithms to mathematically deduplicate unique visitors over any time window without ever storing their IP addresses.

    This skill requires a Python 3 environment with access to your Nginx log directory; it is designed to be invoked by any AI agent capable of executing shell commands or Python scripts to manage reporting tasks.

    Yes, the skill includes a specialized filtering engine that identifies and excludes self-declared crawlers and bots, ensuring your analytics reflect real human engagement rather than automated traffic.

    Since the tool converts raw log data into anonymized HyperLogLog sketches and never stores full IP addresses or cookies, it is inherently designed to meet strict GDPR and privacy-first data standards.

    The package includes the core HyperLogLog processing engine, the log rotation persistence logic, a configuration template for environment variables, and documentation for setting up the hourly automation.

    Unlike basic scripts, this skill handles Nginx's 14-day log rotation by persisting daily summaries into a permanent JSON format, allowing you to track long-term trends without losing historical data.

    New in LLM Ops

    Free