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/Request.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/Request.php')
-rw-r--r-- | core/Tracker/Request.php | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/core/Tracker/Request.php b/core/Tracker/Request.php index b40a283e41..591ccc0971 100644 --- a/core/Tracker/Request.php +++ b/core/Tracker/Request.php @@ -237,74 +237,6 @@ class Request } /** - * @return float|int - */ - public function getDaysSinceFirstVisit() - { - $cookieFirstVisitTimestamp = $this->getParam('_idts'); - - if (!$this->isTimestampValid($cookieFirstVisitTimestamp)) { - $cookieFirstVisitTimestamp = $this->getCurrentTimestamp(); - } - - $daysSinceFirstVisit = floor(($this->getCurrentTimestamp() - $cookieFirstVisitTimestamp) / 86400); - - if ($daysSinceFirstVisit < 0) { - $daysSinceFirstVisit = 0; - } - - return $daysSinceFirstVisit; - } - - /** - * @return bool|float|int - */ - public function getDaysSinceLastOrder() - { - $daysSinceLastOrder = false; - $lastOrderTimestamp = $this->getParam('_ects'); - - if ($this->isTimestampValid($lastOrderTimestamp)) { - $daysSinceLastOrder = round(($this->getCurrentTimestamp() - $lastOrderTimestamp) / 86400, $precision = 0); - if ($daysSinceLastOrder < 0) { - $daysSinceLastOrder = 0; - } - } - - return $daysSinceLastOrder; - } - - /** - * @return float|int - */ - public function getDaysSinceLastVisit() - { - $daysSinceLastVisit = 0; - $lastVisitTimestamp = $this->getParam('_viewts'); - - if ($this->isTimestampValid($lastVisitTimestamp)) { - $daysSinceLastVisit = round(($this->getCurrentTimestamp() - $lastVisitTimestamp) / 86400, $precision = 0); - if ($daysSinceLastVisit < 0) { - $daysSinceLastVisit = 0; - } - } - - return $daysSinceLastVisit; - } - - /** - * @return int|mixed - */ - public function getVisitCount() - { - $visitCount = $this->getParam('_idvc'); - if ($visitCount < 1) { - $visitCount = 1; - } - return $visitCount; - } - - /** * Returns the language the visitor is viewing. * * @return string browser language code, eg. "en-gb,en;q=0.5" @@ -366,10 +298,6 @@ class Request '_ref' => array('', 'string'), '_rcn' => array('', 'string'), '_rck' => array('', 'string'), - '_idts' => array(0, 'int'), - '_viewts' => array(0, 'int'), - '_ects' => array(0, 'int'), - '_idvc' => array(1, 'int'), 'url' => array('', 'string'), 'urlref' => array('', 'string'), 'res' => array(self::UNKNOWN_RESOLUTION, 'string'), |