PHPackages                             beast/visitor-tracker-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. beast/visitor-tracker-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

beast/visitor-tracker-bundle
============================

A simple Symfony bundle for visitor tracking and CLI analytics

v1.0.17(9mo ago)0174↓50%MITPHPPHP &gt;=8.0

Since Jul 20Pushed 9mo agoCompare

[ Source](https://github.com/hollodk/visitor-tracker-bundle)[ Packagist](https://packagist.org/packages/beast/visitor-tracker-bundle)[ RSS](/packages/beast-visitor-tracker-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (19)Used By (0)

🕵️ Beast Visitor Tracker Bundle
===============================

[](#️-beast-visitor-tracker-bundle)

A modern, developer-friendly, privacy-aware Symfony bundle for tracking, analyzing, and auditing traffic to your app or site — with zero JavaScript, no cookies, and full CLI access.

> Built for privacy-first analytics, sysadmin diagnostics, devops monitoring, and marketing insights — from a single log source.
>
> Note: This tool is not designed to replace Google Analytics or enterprise-grade analytics suites. It shines in the early stages of development, during MVP testing, or in debugging phases where performance insights, traffic logs, and CLI-driven analytics are more valuable than dashboards. It prioritizes simplicity, speed, and visibility for developers and teams.

---

✨ Features
----------

[](#-features)

🚀 Features 🧾 File-Based Logging Tracks each request in structured .log files — no database needed.

- ✅ Rich Visitor Metadata Captures:
    - IP address (anonymized if enabled)
    - Browser, OS, device type
    - Referrer, UTM parameters
    - Country, city, ISP (via optional geo API)
    - Auth status, route name, HTTP status
    - Request duration, memory usage, response size
    - Bot detection and unique visitor fingerprinting
- ⚙️ CLI-First Analytics Everything runs from the Symfony CLI — no external dashboards, no browser needed.
- 📊 Purpose-Driven Tools Tailored commands for:
    - Sysadmin: detect warnings, high memory usage, and timeouts
    - DevOps: status code trends, duration spikes, CDN usage
    - Marketing: campaign UTM performance and visitor source summaries
    - Developers: route usage, controller profiling
- 📈 Real-Time Monitoring Stream logs live using visitor:tail and analyze hot traffic without delay.
- 🧠 Smart Aggregation Group by route, URI, hour, date, browser, country, UTM source, and more.
- 🔒 Privacy &amp; Compliance Ready
    - No cookies or sessions
    - IP masking and optional geolocation
    - Consent-free operation (GDPR/CCPA friendly by default)
- 📂 Minimal Setup, Zero Overhead Plug-and-play with Symfony. Just install and go — logging starts immediately.

---

🚀 Installation
--------------

[](#-installation)

```
composer require beast/visitor-tracker-bundle
```

If you're not using Symfony Flex, manually register the bundle:

```
// config/bundles.php
return [
    Beast\VisitorTrackerBundle\BeastVisitorTrackerBundle::class => ['all' => true],
];
```

```
// config/packages/beast_visitor_tracker.yaml
beast_visitor_tracker:
  geo_enabled: false         # Disable geo API calls for privacy
  ip_anonymize: true         # Mask last part of IP address
  log_dir: '%kernel.project_dir%/var/visitor_tracker/logs'
```

---

🧠 How It Works
--------------

[](#-how-it-works)

Every main request triggers the logger:

```
Beast\VisitorTrackerBundle\EventSubscriber\VisitorLoggerSubscriber
```

...and at termination, enriches the last matching log entry with:

- request duration
- memory usage
- HTTP status
- route name
- content type
- authentication status

Log entries are stored per day:

```
var/visitor_tracker/logs/YYYY-MM-DD.log
```

Example entry:

```
{
    "date": "2025-07-27 11:31:25",
    "ip": "127.0.0.1",
    "uri": "\/serial-number?utm_source=facebook&utm_campaign=summer",
    "method": "GET",
    "user_agent": "Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/136.0.0.0 Safari\/537.36",
    "visitor_id": "574136fe4bbfcbdf48c98e38e50604cbd448e9d9",
    "referrer": null,
    "referrer_domain": null,
    "referrer_path": null,
    "country": "unknown",
    "city": null,
    "isp": null,
    "browser": "Chrome",
    "os": "Linux",
    "device": "desktop",
    "is_bot": false,
    "utm": {
        "utm_source": "facebook",
        "utm_campaign": "summer"
    },
    "locale": "en-US",
    "duration_ms": 21.02,
    "status_code": 200,
    "route": "app_serialnumber_index",
    "memory_usage_bytes": 4194304,
    "auth": "anon",
    "content_type": "text\/html; charset=UTF-8",
    "response_size_bytes": 45423,
    "php_warnings": {
        "notice": 0,
        "warning": 0,
        "deprecated": 0,
        "error": 0
    }
}
```

---

🧪 CLI Commands
--------------

[](#-cli-commands)

### visitor:tail

[](#visitortail)

Real-time traffic monitor

Stream new visitor logs as they happen.

```
bin/console visitor:tail --follow
```

Options:

```
--filter=bot|utm|referrer|new|return
--date=YYYY-MM-DD
--preview=20
```

### visitor:metric

[](#visitormetric)

Internal system metrics from logs

Summarizes durations, memory, payload, response size, errors, and performance.

```
bin/console visitor:metric --from=-7days
```

Great for: performance profiling and trend detection.

### visitor:trend

[](#visitortrend)

Track visitor trends over time

Useful for spotting traffic spikes or drop-offs.

```
bin/console visitor:trend --type=requests|bots|utm --days=30
```

### visitor:sysadmin

[](#visitorsysadmin)

Health check for your app/server

Scans for:

- PHP warnings &amp; errors
- Memory spikes
- Long-running requests
- Unexpected status codes

```
bin/console visitor:sysadmin
```

### visitor:devops

[](#visitordevops)

Operational diagnostics

Breaks down:

- CDN or URI usage patterns
- Route-level performance
- Traffic load by hour
- Status code trends

```
bin/console visitor:devops
```

### visitor:snapshot

[](#visitorsnapshot)

Point-in-time export

Generate a snapshot JSON of visitor data for sharing, archiving, or analysis.

```
bin/console visitor:snapshot --output=stats.json
```

### 📈 `visitor:cleanup`

[](#-visitorcleanup)

Full dashboard for the last 30 days.

```
php bin/console visitor:stats
```

Includes:

- Total / unique / returning / bot visitors
- Hourly &amp; daily charts
- Country, city, browser, device, OS, UTM, referrer stats
- Top visited pages
- Weekly aggregates

---

💡 Use Cases
-----------

[](#-use-cases)

- Lightweight, private web analytics
- Monitoring APIs/microservices
- Campaign/UTM effectiveness analysis
- Debugging slow or memory-hungry routes
- GDPR-safe internal dashboards

---

🔐 Privacy &amp; Compliance
--------------------------

[](#-privacy--compliance)

We collect only:

- IP (anonymized if enabled)
- User-Agent
- UTM/referrer
- Route/URI &amp; status
- Duration &amp; memory usage (no personal data)

✅ No cookies, sessions, or user tracking unless you add it manually. ✅ Fully usable without consent banners. ❗ Geolocation via `ipapi.co` can be disabled.

---

👤 Author
--------

[](#-author)

Michael Holm Kristensen Part of the Clubmaster GmbH ecosystem 🔗 [github.com/hollodk](https://github.com/hollodk)

---

📄 License
---------

[](#-license)

MIT — Use it freely, fork it proudly.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance56

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

18

Last Release

295d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ee90a31416b7f47e230b18698abf807c0fbf8b14198d062023372b488136d241?d=identicon)[hollo](/maintainers/hollo)

---

Top Contributors

[![hollodk](https://avatars.githubusercontent.com/u/651271?v=4)](https://github.com/hollodk "hollodk (42 commits)")

### Embed Badge

![Health badge](/badges/beast-visitor-tracker-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/beast-visitor-tracker-bundle/health.svg)](https://phpackages.com/packages/beast-visitor-tracker-bundle)
```

###  Alternatives

[winzou/state-machine-bundle

Bundle for the very lightweight yet powerful PHP state machine

34010.4M15](/packages/winzou-state-machine-bundle)[stfalcon/tinymce-bundle

This Bundle integrates TinyMCE WYSIWYG editor into a Symfony2 project.

2692.9M24](/packages/stfalcon-tinymce-bundle)[sylius/taxonomy-bundle

Flexible categorization system for Symfony.

26388.2k7](/packages/sylius-taxonomy-bundle)[symfony/ai-bundle

Integration bundle for Symfony AI components

30282.3k6](/packages/symfony-ai-bundle)[sylius/addressing-bundle

Addressing and zone management for Symfony applications.

33221.4k3](/packages/sylius-addressing-bundle)[sylius/inventory-bundle

Flexible inventory management for Symfony applications.

19176.7k4](/packages/sylius-inventory-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
