https://github.com/oscarotero/matomo-tracker
Generate Matomo tracker urls that you can use to insert tracking images in your site
https://github.com/oscarotero/matomo-tracker
matomo tracking
Last synced: 12 days ago
JSON representation
Generate Matomo tracker urls that you can use to insert tracking images in your site
- Host: GitHub
- URL: https://github.com/oscarotero/matomo-tracker
- Owner: oscarotero
- License: mit
- Created: 2018-09-05T18:29:43.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-12-16T18:16:31.000Z (over 3 years ago)
- Last Synced: 2024-10-12T00:43:23.729Z (6 months ago)
- Topics: matomo, tracking
- Language: PHP
- Homepage:
- Size: 35.2 KB
- Stars: 2
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Matomo tracker
[](https://travis-ci.com/oscarotero/matomo-tracker)
Simple library to generate [Matomo](https://matomo.org/) tracker urls that you can use to insert tracking images in your site.
It's compatible with [PSR-7 `ServerRequestInterfaces`](https://www.php-fig.org/psr/psr-7/#321-psrhttpmessageserverrequestinterface)## Requirements
* PHP >= 7.0
## Installation
This package is installable and autoloadable via Composer as [oscarotero/matomo-tracker](https://packagist.org/packages/oscarotero/matomo-tracker).
```sh
composer require oscarotero/matomo-tracker
```## Example
```php
use MatomoTracker\Url;$url = Url::createFromServerRequest($serverRequest, 'https://analytics.example.com/piwik.php', 1);
$url->title('Page title')
->userId($user->getId());echo sprintf('
', (string) $url);
```Please see [CHANGELOG](CHANGELOG.md) for more information about recent changes.
The MIT License (MIT). Please see [LICENSE](LICENSE) for more information.