diff --git a/config/global.ini.php b/config/global.ini.php index a01f51b1d7d362d660524070994c3108de4dbb3c..649b1964baba78da51f2454277d45a73dc9b9f36 100644 --- a/config/global.ini.php +++ b/config/global.ini.php @@ -472,13 +472,6 @@ use_third_party_id_cookie = 0 ; Once enabled (set to 1) messages will be logged to all loggers defined in "[log] log_writers" config. debug = 0 -; There is a feature in the Tracking API that lets you create new visit at any given time, for example if you know that a different user/customer is using -; the app then you would want to tell Piwik to create a new visit (even though both users are using the same browser/computer). -; To prevent abuse and easy creation of fake visits, this feature requires admin token_auth by default -; If you wish to use this feature using the Javascript tracker, you can set the setting new_visit_api_requires_admin=0, and in Javascript write: -; _paq.push(['appendToTrackingUrl', 'new_visit=1']); -new_visit_api_requires_admin = 1 - ; This setting is described in this FAQ: http://piwik.org/faq/how-to/faq_175/ ; Note: generally this should only be set to 1 in an intranet setting, where most users have the same configuration (browsers, OS) ; and the same IP. If left to 0 in this setting, all visitors will be counted as one single visitor. diff --git a/core/Tracker/Visitor.php b/core/Tracker/Visitor.php index 3cc2275853180a6256964465b26d1751c03eaa25..846c7c78acfaf9810caf08ff0b1922532d187a7e 100644 --- a/core/Tracker/Visitor.php +++ b/core/Tracker/Visitor.php @@ -153,10 +153,7 @@ class Visitor $isNewVisitForced = $this->request->getParam('new_visit'); $isNewVisitForced = !empty($isNewVisitForced); - $newVisitEnforcedAPI = $isNewVisitForced - && ($this->request->isAuthenticated() - || !Config::getInstance()->Tracker['new_visit_api_requires_admin']); - $enforceNewVisit = $newVisitEnforcedAPI || Config::getInstance()->Debug['tracker_always_new_visitor']; + $enforceNewVisit = $isNewVisitForced || Config::getInstance()->Debug['tracker_always_new_visitor']; if (!$enforceNewVisit && $visitRow diff --git a/libs/PiwikTracker/PiwikTracker.php b/libs/PiwikTracker/PiwikTracker.php index c6629d4473184df88d31585bdb8a6b2744ffc1ba..aec4d011a4066c131d980fb9a350725138e0c2bf 100644 --- a/libs/PiwikTracker/PiwikTracker.php +++ b/libs/PiwikTracker/PiwikTracker.php @@ -926,9 +926,6 @@ class PiwikTracker * By default, Piwik will create a new visit if the last request by this user was more than 30 minutes ago. * If you call setForceNewVisit() before calling doTrack*, then a new visit will be created for this request. * - * Allowed only for Super User, must be used along with setTokenAuth() - * - * @see setTokenAuth() */ public function setForceNewVisit() {