Download the PHP package inspyrenees/umami-bundle without Composer
On this page you can find all versions of the php package inspyrenees/umami-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package umami-bundle
Umami Bundle for Symfony
A Symfony bundle for integrating with Umami Analytics API. This bundle provides a simple and elegant way to fetch analytics data from your Umami instance.
Features
- 🔐 Automatic authentication with Umami API
- 📊 Complete API coverage (metrics, stats, page views, etc.)
- ⚙️ Simple configuration via environment variables
- 🎯 Type-safe and well-documented methods
- 🔄 Token caching to minimize authentication requests
Requirements
- PHP 8.1 or higher
- Symfony 7.0 or 8.0
- Umami Analytics instance with API access
Installation
Install the bundle via Composer:
If you're not using Symfony Flex, you'll need to enable the bundle manually in config/bundles.php:
Configuration
Simple Setup (Recommended)
Add your Umami credentials directly to your .env file:
That's it! The bundle will automatically use these environment variables.
Advanced Configuration (Optional)
If you need to customize settings or override environment variables, create config/packages/umami.yaml:
Usage
Basic Usage
Inject the UmamiClientInterface into your controller or service:
Available Methods
Get Page Metrics
Get Website Statistics
Returns:
Get Metrics by Type
Example response format:
Get Page Views Over Time
Available units: year, month, day, hour
Get Active Users (Real-time)
Advanced Usage
Custom Metrics Query
You can query any metric type supported by Umami:
Clear Authentication Token
If you need to force re-authentication (e.g., after credential changes):
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This bundle is released under the MIT License. See the LICENSE file for details.
All versions of umami-bundle with dependencies
symfony/config Version ^7.0|^8.0
symfony/dependency-injection Version ^7.0|^8.0
symfony/http-client Version ^7.0|^8.0
symfony/http-kernel Version ^7.0|^8.0