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 /plugins/CoreHome/VisitorDetails.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 'plugins/CoreHome/VisitorDetails.php')
-rw-r--r-- | plugins/CoreHome/VisitorDetails.php | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/plugins/CoreHome/VisitorDetails.php b/plugins/CoreHome/VisitorDetails.php index ad6a531d43..2c32a9a1cd 100644 --- a/plugins/CoreHome/VisitorDetails.php +++ b/plugins/CoreHome/VisitorDetails.php @@ -25,7 +25,9 @@ class VisitorDetails extends VisitorDetailsAbstract $visitor['visitEcommerceStatus'] = $this->getVisitEcommerceStatus(); $visitor['visitEcommerceStatusIcon'] = $this->getVisitEcommerceStatusIcon(); $visitor['daysSinceFirstVisit'] = $this->getDaysSinceFirstVisit(); + $visitor['secondsSinceFirstVisit'] = $this->getSecondsSinceFirstVisit(); $visitor['daysSinceLastEcommerceOrder'] = $this->getDaysSinceLastEcommerceOrder(); + $visitor['secondsSinceLastEcommerceOrder'] = $this->getSecondsSinceLastEcommerceOrder(); $visitor['visitDuration'] = $this->getVisitLength(); $visitor['visitDurationPretty'] = $this->getVisitLengthPretty(); } @@ -62,12 +64,22 @@ class VisitorDetails extends VisitorDetailsAbstract protected function getDaysSinceFirstVisit() { - return $this->details['visitor_days_since_first']; + return floor($this->details['visitor_seconds_since_first'] / 86400); + } + + protected function getSecondsSinceFirstVisit() + { + return $this->details['visitor_seconds_since_first']; } protected function getDaysSinceLastEcommerceOrder() { - return $this->details['visitor_days_since_order']; + return floor($this->details['visitor_seconds_since_order'] / 86400); + } + + protected function getSecondsSinceLastEcommerceOrder() + { + return $this->details['visitor_seconds_since_order']; } protected function getVisitorReturning() |