@moritz-h opened this Issue on May 31st 2018

I want to combine server side and client side tracking, to have advantages of both.
(Server side will count all visits, also where piwik.js is blocked. While JS tracking can give addition informations where it is not blocked, like clicks an outgoing links, screen resolutions, etc.)

I know there was multiple feature requests in the past. (like #9963 or #10422)
They where all closed as duplicate of #9665.

But I think #9665 is something completely different. The discussion is about analysing server logfiles.
I want to combine with PHP tracking not using any server logfiles.

I'm thinking of something like this (just a quick idea):
In php code:

$t = new PiwikTracker(...);

And in the template:

<script type="text/javascript">
  var _paq = _paq || [];
  _paq.push(['<?php echo $t->getSomeId();?>']);

If JS or Matomo is blocked PHP will count the visit. If Matomo will run client side it could extend the php tracking with all information the JS Tracker usually saves.

I think this is different from #9665 because a PHP solution is independent from any other server software. Also merging the client and server side tracking data is much easier for Matomo, because it could share any kind of id between server and cliend side. I think the log file analysis is more complicated compared to this.

Powered by GitHub Issue Mirror