Skip to content
Extraits de code Groupes Projets
Valider 693c27f8 rédigé par mattab's avatar mattab
Parcourir les fichiers

Ignore new google and facebook bots http://forum.piwik.org/read.php?2,106051

parent e8477253
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -143,6 +143,8 @@ class VisitExcluded
&& (strpos($this->userAgent, 'Googlebot') !== false // Googlebot
|| strpos($this->userAgent, 'Google Web Preview') !== false // Google Instant
|| strpos($this->userAgent, 'Google Page Speed Insights') !== false // #4049
|| strpos($this->userAgent, 'Google (+https://developers.google.com') !== false // Google Snippet https://developers.google.com/+/web/snippet/
|| strpos($this->userAgent, 'facebookexternalhit') !== false // http://www.facebook.com/externalhit_uatext.php
|| strpos($this->userAgent, 'bingbot') !== false // Bingbot
|| strpos($this->userAgent, 'YottaaMonitor') !== false // Yottaa
|| strpos($this->userAgent, 'CloudFlare') !== false // CloudFlare-AlwaysOnline
......
......@@ -78,6 +78,7 @@ if ($GLOBALS['PIWIK_TRACKER_DEBUG'] === true) {
if (!defined('PIWIK_ENABLE_TRACKING') || PIWIK_ENABLE_TRACKING) {
$process = new Tracker();
try {
$process->main();
} catch (Exception $e) {
......
......@@ -98,7 +98,7 @@ class API
$isAuthenticatedWithViewAccess = Piwik::isUserHasViewAccess($idSites) && !Piwik::isUserIsAnonymous();
$segments[] = array(
'type' => 'dimension',
'type' => 'metric',
'category' => Piwik_Translate('General_Visit'),
'name' => 'General_VisitorIP',
'segment' => 'visitIp',
......
......@@ -26,6 +26,6 @@ class ArchivingProcessBenchmark extends BenchmarkTestCase
public function testArchivingProcess()
{
API::getInstance()->get(
self::$fixture->idSite, self::$fixture->period, self::$fixture->date);
self::$fixturvisitIpe->idSite, self::$fixture->period, self::$fixture->date);
}
}
......@@ -71,6 +71,9 @@ class Test_Piwik_Fixture_InvalidVisits extends Test_Piwik_BaseFixture
$t->setIp('211.1.2.3');
self::checkResponse($t->doTrackPageView('visit from excluded User Agent'));
$t->setUserAgent('Mozilla/5.0 (Windows NT 6.1; rv:6.0) Gecko/20110814 Firefox/6.0 Google (+https://developers.google.com/+/web/snippet/)');
self::checkResponse($t->doTrackPageView('visit from excluded User Agent'));
// test w/ global excluded User Agent
$t->setUserAgent('Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6 (.NET CLR 3.5.30729) (globalexcludeduseragent)');
$t->setIp('211.1.2.3');
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter