diff options
author | sgiehl <stefan@matomo.org> | 2020-07-24 14:11:05 +0300 |
---|---|---|
committer | sgiehl <stefan@matomo.org> | 2020-07-24 15:28:48 +0300 |
commit | 679e73f1236969db0c2d767655cb84456a727d24 (patch) | |
tree | 648722fa79cb524f8819857e79163e0c1cf16d59 /js/tracker.php | |
parent | 6b5f8138180716d5088d764f0b41d5787159b28a (diff) | |
parent | 3e1234a887f56a1cf853e29ba89370b234af5127 (diff) |
Merge branch '3.x-dev' into 4.x-dev
Diffstat (limited to 'js/tracker.php')
-rw-r--r-- | js/tracker.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/js/tracker.php b/js/tracker.php index 8098163654..0e70c4c641 100644 --- a/js/tracker.php +++ b/js/tracker.php @@ -67,6 +67,19 @@ $environment = new \Piwik\Application\Environment(null, array( )); $environment->init(); +if (!\Piwik\Tracker\IgnoreCookie::isIgnoreCookieFound()) { + + $request = new \Piwik\Tracker\Request(array()); + + if ($request->shouldUseThirdPartyCookie()) { + $visitorId = $request->getVisitorIdForThirdPartyCookie(); + if (!$visitorId) { + $visitorId = \Piwik\Common::hex2bin(\Piwik\Tracker\Visit::generateUniqueVisitorId()); + } + $request->setThirdPartyCookie($visitorId); + } +} + ProxyHttp::serverStaticFile($file, "application/javascript; charset=UTF-8", $daysExpireFarFuture, $byteStart, $byteEnd); exit; |