shetabit/visitor
Track and log Laravel visitors: browser, platform, device, IP, languages, user agent, and request data. Use visitor() helper or $request->visitor(). Record visits for any model via Visitable trait, count views/unique visitors, and detect online users.
Real-Time Engagement Features:
Enable "Live Activity Indicators" (e.g., "3 users are viewing this document") for collaboration tools (e.g., Notion clones, Slack alternatives) or customer support dashboards (e.g., Zendesk integrations). The onlineVisitors() method provides a lightweight alternative to WebSockets for real-time presence detection, reducing backend complexity.
Data-Driven Product Analytics:
visitLogs()->count() to identify high-traffic pages and prioritize SEO/content updates. Example: "Invest in improving the checkout flow, which accounts for 40% of all visits."visitor()->platform() to inform feature rollouts. Example: "Mobile users engage 25% more with video tutorials—prioritize mobile video support."Build vs. Buy Decision:
Vertical-Specific Use Cases:
Compliance & Privacy:
/admin) from logging via middleware configuration (LogVisits). Purge logs programmatically to meet data retention policies.Monetization Strategies:
express-visitor or ua-parser-js.django-user-agents or requests-user-agent.*"This Laravel package lets us track visitor behavior—like which pages they view, their devices, and whether they’re active in real-time—without adding complexity or cost. Think of it as our own lightweight Google Analytics, but built into our app and fully compliant with GDPR. We can use this to:
It’s a quick win (2–4 hours to implement) that unlocks data-driven decisions without hiring data scientists or integrating expensive SaaS tools."*
*"This package solves three key problems for us:
Why this over building it ourselves?
Visitable, Visitor) or middleware (LogVisits) for edge cases.Trade-offs:
Implementation Plan:
*"This tool helps us understand how users interact with our product so we can make smarter
How can I help you explore Laravel packages today?