diff options
author | diosmosis <diosmosis@users.noreply.github.com> | 2020-06-26 16:17:54 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-26 16:17:54 +0300 |
commit | de5ae85e7a11f7bbd962256c890a32188c40d000 (patch) | |
tree | 2a5f303c83b6e80369d3ba77b2d9fea797c598d9 /core/Tracker/VisitorRecognizer.php | |
parent | b12946909ff323ea2f7e7af04e4435d2dd503023 (diff) |
Track seconds instead of days for "days since" dimensions (#15774)
* Modify dimensions and add tests.
* unfinished debugging commit
* changes to fix test, remove tracker code, add update code
* fix some tests
* fix migration issue
* fixing some tests
* fix some bugs, update some expected test files, remove _idvc from some tests
* start replacing _ects
* Finish seconds since last ecommerce order change.
* fix couple issues
* fix a couple tests
* fix some more tests
* fixing a couple more tests
* apply review feedback
* unfinished commit
* add back dimensions =
* fixing tests & removing some code
* fix some bugs + tests and remove debugging code
* fixing some tests and issues
* Some debugging code for the tracker in case of exceptions.
* debug and fix another issue when tracking visits in the past
* fix test
* update JS and fix several tests
* Fixing more tests.
* Add missing files.
* update expected test files
* Add some unit tests.
* update more expected files
* update more test files
* update more test files
* update changelog and remove _ects query param
* apply review feedback
* fix merge issue
* clearer code
* fix migration issue
* update expected files
* update expected files again
* updating tests
* fix test
* rebuilt piwik.js
* unify previous visitor properties / original visit row approach
* fixing some tests
* Add new column version entries into the option table.
* try undoing 1.5 update change
* apply review feedback
* remove more unused cookie values
* rebuilt piwik.js
* Fix test count.
* update test files
* rebuilt piwik.js
* removel log analytics submodule update
* update submodule
* update some expected screenshots
* Fix versions in omnifixture since we were probably adding to the beta update after it changed.
* update screenshots
Diffstat (limited to 'core/Tracker/VisitorRecognizer.php')
-rw-r--r-- | core/Tracker/VisitorRecognizer.php | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/core/Tracker/VisitorRecognizer.php b/core/Tracker/VisitorRecognizer.php index e241384419..10fb9b60b9 100644 --- a/core/Tracker/VisitorRecognizer.php +++ b/core/Tracker/VisitorRecognizer.php @@ -111,7 +111,6 @@ class VisitorRecognizer if ($visitRow && count($visitRow) > 0 ) { - $visitProperties->setProperty(self::KEY_ORIGINAL_VISIT_ROW, $visitRow); $visitProperties->setProperty('idvisitor', $visitRow['idvisitor']); $visitProperties->setProperty('user_id', $visitRow['user_id']); @@ -128,14 +127,13 @@ class VisitorRecognizer } } - public function removeUnchangedValues(VisitProperties $visitProperties, $visit) + public function removeUnchangedValues($visit, VisitProperties $originalVisit = null) { - $originalRow = $visitProperties->getProperty(self::KEY_ORIGINAL_VISIT_ROW); - - if (empty($originalRow)) { + if (empty($originalVisit)) { return $visit; } + $originalRow = $originalVisit->getProperties(); if (!empty($originalRow['idvisitor']) && !empty($visit['idvisitor']) && bin2hex($originalRow['idvisitor']) === bin2hex($visit['idvisitor'])) { @@ -240,8 +238,8 @@ class VisitorRecognizer 'visit_exit_idaction_url', 'visit_exit_idaction_name', 'visitor_returning', - 'visitor_days_since_first', - 'visitor_days_since_order', + 'visitor_seconds_since_first', + 'visitor_seconds_since_order', 'visitor_count_visits', 'visit_goal_buyer', |