diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2015-10-20 13:14:26 +0300 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2015-10-20 13:14:26 +0300 |
commit | a25aba2ae5c1833e5b28f1e1025f559a36d4b52f (patch) | |
tree | 8f25a5ead3487eeca94c5671bd3043077ecbd121 /plugins/CoreHome | |
parent | 7bf1caf6115cac81ad66ba6d7cf30ecd4fc831f2 (diff) | |
parent | 4575b8b0098554f18f1895e1c164a365d8c23222 (diff) |
Merge branch 'master' into 3.0
Conflicts:
core/Version.php
plugins/CoreHome/javascripts/menu.js
plugins/Events/Reports/GetActionFromCategoryId.php
plugins/Events/Reports/GetActionFromNameId.php
plugins/Events/Reports/GetCategoryFromActionId.php
plugins/Events/Reports/GetCategoryFromNameId.php
plugins/Events/Reports/GetNameFromActionId.php
plugins/Events/Reports/GetNameFromCategoryId.php
tests/UI/expected-ui-screenshots
Diffstat (limited to 'plugins/CoreHome')
-rw-r--r-- | plugins/CoreHome/Tracker/VisitRequestProcessor.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/CoreHome/Tracker/VisitRequestProcessor.php b/plugins/CoreHome/Tracker/VisitRequestProcessor.php index 7fee641de0..e4e5a2ddf8 100644 --- a/plugins/CoreHome/Tracker/VisitRequestProcessor.php +++ b/plugins/CoreHome/Tracker/VisitRequestProcessor.php @@ -19,6 +19,7 @@ use Piwik\Tracker\Settings; use Piwik\Tracker\Visit\VisitProperties; use Piwik\Tracker\VisitExcluded; use Piwik\Tracker\VisitorRecognizer; +use Piwik\Plugins\PrivacyManager\Config as PrivacyManagerConfig; /** * Encapsulates core tracking logic related to visits. @@ -91,8 +92,15 @@ class VisitRequestProcessor extends RequestProcessor return true; } + $privacyConfig = new PrivacyManagerConfig(); + + $ip = $request->getIpString(); + if ($privacyConfig->useAnonymizedIpForVisitEnrichment) { + $ip = $visitProperties->getProperty('location_ip'); + } + // visitor recognition - $visitorId = $this->userSettings->getConfigId($request, $visitProperties->getProperty('location_ip')); + $visitorId = $this->userSettings->getConfigId($request, $ip); $request->setMetadata('CoreHome', 'visitorId', $visitorId); $isKnown = $this->visitorRecognizer->findKnownVisitor($visitorId, $visitProperties, $request); |