oscarotero / matomo-tracker
A matomo-tracker url generator compatible with PSR-7
dev-master
2021-12-16 18:16 UTC
Requires
- php: ^7.2|^8.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.0
- laminas/laminas-diactoros: ^2.3
- middlewares/utils: ^3.1
- phpunit/phpunit: ^6.0|^7.0|^8.0
- squizlabs/php_codesniffer: ^3.0
This package is auto-updated.
Last update: 2024-11-17 01:05:38 UTC
README
Simple library to generate Matomo tracker urls that you can use to insert tracking images in your site.
It's compatible with PSR-7 ServerRequestInterfaces
Requirements
- PHP >= 7.0
Installation
This package is installable and autoloadable via Composer as oscarotero/matomo-tracker.
composer require oscarotero/matomo-tracker
Example
use MatomoTracker\Url; $url = Url::createFromServerRequest($serverRequest, 'https://analytics.example.com/piwik.php', 1); $url->title('Page title') ->userId($user->getId()); echo sprintf('<img src="%s">', (string) $url);
Please see CHANGELOG for more information about recent changes.
The MIT License (MIT). Please see LICENSE for more information.