Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Giehl <stefan@matomo.org>2020-10-27 18:19:45 +0300
committerGitHub <noreply@github.com>2020-10-27 18:19:45 +0300
commiteb1543097d188c322b8470fea240fb62e39d01dd (patch)
tree542900fe35e0c24bb03fa1ea37326b34ec23259e /plugins/CustomJsTracker
parent8f703bbc9d914d013c124d1e1d0f2ecd47d88ec4 (diff)
Adds possibility to force cookie less tracking (#16592)
* Add system and measurable setting to enable cookie less tracking * Never return a visitor id if cookieless tracking is forced * Adds custom tracker.js to prevent cookies * ignore exceptions * cache setting in site attributes for faster tracking * updates expected test files * ensure getVisitorId also works without idSite in request * fix js tests * store global cookie flag in config to avoid failures when building tracker js * use config instead of systemsetting * use a new event to update the tracker file * Fix handling in Request::getVisitorId() * improve setting descriptions * Revert "use config instead of systemsetting" This reverts commit 1fdfb6808415d2984726cedfe2644de31086f927. * Revert "store global cookie flag in config to avoid failures when building tracker js" This reverts commit 2587dbb851d3e44f2740e39c91af3213930cad6f. * code improvements * Reset storage to ensure it's not filled with invalid database objects * updates expected test files * Remove measurable setting again * move setting from systemsettings to ip anonymization settings * Show a warning if tracker file is not writable * updates expected test file * apply some review feedback * fix test * updates expected screenshot * apply review feedback * submodule update
Diffstat (limited to 'plugins/CustomJsTracker')
-rw-r--r--plugins/CustomJsTracker/CustomJsTracker.php3
-rw-r--r--plugins/CustomJsTracker/TrackingCode/JsTestPluginTrackerFiles.php5
2 files changed, 7 insertions, 1 deletions
diff --git a/plugins/CustomJsTracker/CustomJsTracker.php b/plugins/CustomJsTracker/CustomJsTracker.php
index 5a15fed2d9..9529498d1a 100644
--- a/plugins/CustomJsTracker/CustomJsTracker.php
+++ b/plugins/CustomJsTracker/CustomJsTracker.php
@@ -23,7 +23,8 @@ class CustomJsTracker extends Plugin
'PluginManager.pluginInstalled' => 'updateTracker',
'PluginManager.pluginUninstalled' => 'updateTracker',
'Updater.componentUpdated' => 'updateTracker',
- 'Controller.CoreHome.checkForUpdates.end' => 'updateTracker'
+ 'Controller.CoreHome.checkForUpdates.end' => 'updateTracker',
+ 'CustomJsTracker.updateTracker' => 'updateTracker'
);
}
diff --git a/plugins/CustomJsTracker/TrackingCode/JsTestPluginTrackerFiles.php b/plugins/CustomJsTracker/TrackingCode/JsTestPluginTrackerFiles.php
index 160fee1cc4..c30ab89f60 100644
--- a/plugins/CustomJsTracker/TrackingCode/JsTestPluginTrackerFiles.php
+++ b/plugins/CustomJsTracker/TrackingCode/JsTestPluginTrackerFiles.php
@@ -25,6 +25,11 @@ class JsTestPluginTrackerFiles extends PluginTrackerFiles
$trackerFiles = \_glob(PIWIK_DOCUMENT_ROOT . '/plugins/*/' . self::TRACKER_FILE);
foreach ($trackerFiles as $trackerFile) {
$pluginName = $this->getPluginNameFromFile($trackerFile);
+
+ if ($pluginName === 'PrivacyManager') {
+ continue; // ignore tracker.js of PrivacyManager, as it would disable Cookies
+ }
+
$dirs[$pluginName] = dirname($trackerFile) . '/';
}
return $dirs;