Skip to content

Generate Matomo tracker urls that you can use to insert tracking images in your site

License

Notifications You must be signed in to change notification settings

oscarotero/matomo-tracker

Repository files navigation

Matomo tracker

Build Status

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.

About

Generate Matomo tracker urls that you can use to insert tracking images in your site

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages