diff options
author | Clayton Daley <clayton.daley@gmail.com> | 2013-10-15 07:31:59 +0400 |
---|---|---|
committer | Clayton Daley <clayton.daley@gmail.com> | 2013-10-15 07:32:46 +0400 |
commit | 4f425ab4697508f8df69d7662a59e46f9b012da6 (patch) | |
tree | 3845f0219ce13d06f338692bc56482ce389771cc /libs | |
parent | 85ee3742931552ae673474afe783154f6920573f (diff) |
Added newVisitor to API call. Moved cookie API logic closer to existing ID info.
Diffstat (limited to 'libs')
-rw-r--r-- | libs/PiwikTracker/PiwikTracker.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/libs/PiwikTracker/PiwikTracker.php b/libs/PiwikTracker/PiwikTracker.php index f45a133645..7eb010837a 100644 --- a/libs/PiwikTracker/PiwikTracker.php +++ b/libs/PiwikTracker/PiwikTracker.php @@ -1160,12 +1160,6 @@ class PiwikTracker '&apiv=' . self::VERSION . '&r=' . substr(strval(mt_rand()), 2, 6) . - // Values collected from cookie - '&_idts=' . $this->createTs . - '&_idvc=' . $this->visitCount . - (!empty($this->lastVisitTs) ? '&_viewts=' . $this->lastVisitTs : '' ) . // note that piwik.js sends an empty value instead of skipping - (!empty($this->lastEcommerceOrderTs) ? '&_ects=' . $this->lastEcommerceOrderTs : '' ) . - // XDEBUG_SESSIONS_START and KEY are related to the PHP Debugger, this can be ignored in other languages (!empty($_GET['XDEBUG_SESSION_START']) ? '&XDEBUG_SESSION_START=' . @urlencode($_GET['XDEBUG_SESSION_START']) : '') . (!empty($_GET['KEY']) ? '&KEY=' . @urlencode($_GET['KEY']) : '') . @@ -1176,6 +1170,13 @@ class PiwikTracker (!empty($this->forcedDatetime) ? '&cdt=' . urlencode($this->forcedDatetime) : '') . ((!empty($this->token_auth) && !$this->doBulkRequests) ? '&token_auth=' . urlencode($this->token_auth) : '') . + // Values collected from cookie + '&_idts=' . $this->createTs . + '&_idvc=' . $this->visitCount . + '&_idn=' . $this->newVisitor . // currently unused + (!empty($this->lastVisitTs) ? '&_viewts=' . $this->lastVisitTs : '' ) . // note that piwik.js sends an empty value instead of skipping + (!empty($this->lastEcommerceOrderTs) ? '&_ects=' . $this->lastEcommerceOrderTs : '' ) . + // These parameters are set by the JS, but optional when using API (!empty($this->plugins) ? $this->plugins : '') . (($this->localHour !== false && $this->localMinute !== false && $this->localSecond !== false) ? '&h=' . $this->localHour . '&m=' . $this->localMinute . '&s=' . $this->localSecond : '') . |