Download the PHP package tlb/umami-bundle without Composer
On this page you can find all versions of the php package tlb/umami-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package umami-bundle
TlbUmamiBundle
TlbUmamiBundle integrates Umami analytics into Symfony applications.
It supports:
- Twig script rendering (
umami_script()) - Server-side event sending (
/api/send) - Reporting API calls for selected Umami v3 endpoints
- Both Umami Cloud API key auth and self-hosted username/password auth
Requirements
- PHP 8.1+
- Symfony 6.4+
- Umami v3
Intended package name: tlb/umami-bundle.
Installation
1) Install package
2) Register bundle
In config/bundles.php:
Configuration
Create config/packages/umami.yaml:
Add env defaults:
Then configure real values in .env.local or deployment environment variables.
UMAMI_TRACKER_DOMAINS supports both comma-separated values (example.com,www.example.com) and JSON array format (["example.com","www.example.com"]).
Switch feature flags in YAML:
- set
umami.mode: cloudfor cloud authentication - set
umami.tracker.enabled: trueto renderumami_script() - set
umami.api.enabled: trueto register API client/event sender services
Example values (prefer setting these in .env.local):
Self-hosted Umami
Umami Cloud
Usage
Twig tracking script
Render the configured script tag:
Override selected attributes at render time:
API client
Inject Tlb\UmamiBundle\Client\UmamiApiClient:
Supported endpoints:
/api/websites/{id}/stats/api/websites/{id}/pageviews/api/websites/{id}/events/stats
Event sender
Inject Tlb\UmamiBundle\Event\UmamiEventSender:
Authentication behavior
cloudmode: sendsx-umami-api-keyheader.self_hostedmode: authenticates via/api/auth/login, stores bearer token, and can cache token in configured cache pool.- On
401/403from API requests, auth is invalidated and one re-auth/retry is attempted.
Development
Run tests:
Symfony Flex recipe template
A ready-to-use recipe template is included at:
recipes/tlb/umami-bundle/1.0/manifest.jsonrecipes/tlb/umami-bundle/1.0/config/packages/umami.yamlrecipes/tlb/umami-bundle/1.0/.env
All versions of umami-bundle with dependencies
symfony/config Version ^6.4 || ^7.1 || ^8.0
symfony/dependency-injection Version ^6.4 || ^7.1 || ^8.0
symfony/http-client Version ^6.4 || ^7.1 || ^8.0
symfony/http-kernel Version ^6.4 || ^7.1 || ^8.0
symfony/twig-bundle Version ^6.4 || ^7.1 || ^8.0
twig/twig Version ^3.0