diff options
Diffstat (limited to 'libs/PiwikTracker/PiwikTracker.php')
-rw-r--r-- | libs/PiwikTracker/PiwikTracker.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libs/PiwikTracker/PiwikTracker.php b/libs/PiwikTracker/PiwikTracker.php index 39eb82b6bd..c998e1913d 100644 --- a/libs/PiwikTracker/PiwikTracker.php +++ b/libs/PiwikTracker/PiwikTracker.php @@ -219,6 +219,8 @@ class PiwikTracker $this->doBulkRequests = false; $this->storedTrackingActions = array(); + $this->sendImageResponse = true; + $this->visitorCustomVar = $this->getCustomVariablesFromCookie(); } @@ -501,6 +503,14 @@ class PiwikTracker } /** + * If image response is disabled Piwik will respond with a HTTP 204 header instead of responding with a gif. + */ + public function disableSendImageResponse() + { + $this->sendImageResponse = false; + } + + /** * Fix-up domain */ static protected function domainFixup($domain) @@ -1524,6 +1534,7 @@ class PiwikTracker (!empty($this->city) ? '&city=' . urlencode($this->city) : '') . (!empty($this->lat) ? '&lat=' . urlencode($this->lat) : '') . (!empty($this->long) ? '&long=' . urlencode($this->long) : '') . + (!$this->sendImageResponse ? '&send_image=0' : '') . // DEBUG $this->DEBUG_APPEND_URL; |