directorytree/metrics
Record and query metrics in Laravel with a simple, elegant API. Track page views, API calls, signups, and other countable events. Supports values, categories, custom attributes, hourly/dated metrics, model-based tracking, and Redis storage.
metric('signups')->record()).metric('api:requests')->category('users')->record()).metric('orders')->measurable($customer)->record()).source, country, or device for granular insights.Metric::thisMonth()->where('name', 'purchases')->sum('value')).For Executives: "This package lets us track critical business metrics (signups, conversions, API usage) without building a custom system—saving 3–6 months of dev time. It’s lightweight, scalable (supports Redis for high traffic), and integrates seamlessly with our Laravel stack. We can start measuring growth, debugging performance, and segmenting user behavior immediately with minimal overhead."
For Engineering: *"DirectoryTree/Metrics provides a batteries-included solution for structured analytics:
metric('signups')->record()).Metric::thisMonth()->where('source', 'google')->sum('value')).with(['country' => 'US'])) or model associations.
Tradeoff: Limited to Laravel/PHP, but avoids vendor lock-in with MIT license. Recommended for MVP analytics or lightweight observability."*How can I help you explore Laravel packages today?