diff --git a/PiwikTracker.php b/PiwikTracker.php index 808dfc8..ddd93f8 100644 --- a/PiwikTracker.php +++ b/PiwikTracker.php @@ -1539,13 +1539,14 @@ protected function sendRequest($url, $method = 'GET', $data = null, $force = fal CURLOPT_USERAGENT => $this->userAgent, CURLOPT_HEADER => true, CURLOPT_TIMEOUT => $this->requestTimeout, + CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => array( 'Accept-Language: ' . $this->acceptLanguage, ), ); if ($method === 'GET') { - $options[CURLOPT_RETURNTRANSFER] = true; + $options[CURLOPT_FOLLOWLOCATION] = true; } if (defined('PATH_TO_CERTIFICATES_FILE')) {