Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/Tracker/VisitExcluded.php2
-rw-r--r--piwik.php1
-rw-r--r--plugins/API/API.php2
-rwxr-xr-xtests/PHPUnit/Benchmarks/ArchivingProcessBenchmark.php2
-rw-r--r--tests/PHPUnit/Fixtures/InvalidVisits.php3
5 files changed, 8 insertions, 2 deletions
diff --git a/core/Tracker/VisitExcluded.php b/core/Tracker/VisitExcluded.php
index 53cca8f7ab..e9af532eea 100644
--- a/core/Tracker/VisitExcluded.php
+++ b/core/Tracker/VisitExcluded.php
@@ -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
diff --git a/piwik.php b/piwik.php
index 1301c3a05f..a4a75e388d 100644
--- a/piwik.php
+++ b/piwik.php
@@ -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) {
diff --git a/plugins/API/API.php b/plugins/API/API.php
index 4181881132..16b3a50c5f 100644
--- a/plugins/API/API.php
+++ b/plugins/API/API.php
@@ -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',
diff --git a/tests/PHPUnit/Benchmarks/ArchivingProcessBenchmark.php b/tests/PHPUnit/Benchmarks/ArchivingProcessBenchmark.php
index 294ec73a12..63f4c9f418 100755
--- a/tests/PHPUnit/Benchmarks/ArchivingProcessBenchmark.php
+++ b/tests/PHPUnit/Benchmarks/ArchivingProcessBenchmark.php
@@ -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);
}
}
diff --git a/tests/PHPUnit/Fixtures/InvalidVisits.php b/tests/PHPUnit/Fixtures/InvalidVisits.php
index 8e31367b58..b2938b6b2d 100644
--- a/tests/PHPUnit/Fixtures/InvalidVisits.php
+++ b/tests/PHPUnit/Fixtures/InvalidVisits.php
@@ -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');