piwik-bundle icon indicating copy to clipboard operation
piwik-bundle copied to clipboard

Link with piwik/piwik-php-tracker

Open kachkaev opened this issue 10 years ago • 2 comments

In some web apps it may be useful to supplement the javascript tracker with a PHP one. This will help ensure that the statistics are not partially missing because of JS errors in old browsers or very slow networks.

Official implementation of the PHP tracker is in piwik/piwik-php-tracker. It can be easily made available as a service in your bundle. Usage example:

$tracker = $container->get('webfactory_piwik.tracker');
$tracker->doThis();
$tracker->doThat();
$response = new Response();
//...
return $response;

When piwik is disabled in config, the PHP tracker should be too (the service can be replaced with a dummy object having the same API).

kachkaev avatar Oct 30 '15 16:10 kachkaev

:+1:

ghost avatar Mar 24 '16 13:03 ghost

Nice idea, I’d be glad to review a PR 🤙🏻

mpdude avatar Dec 06 '18 22:12 mpdude