Remove Google Analytics.
Google shut down the Universal Analytics script that the pages loaded, and we haven't used it probably a decade
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
namespace Xxx\Tests\Pages;
|
||||
|
||||
use Xxx\Tests\Support\PageTestCase;
|
||||
|
||||
// The site has no Google Analytics, even with the old GOOGLE_ANALYTICS_ID in the environment
|
||||
class NoAnalyticsTest extends PageTestCase {
|
||||
protected static function serverEnv(): array {
|
||||
return array('GOOGLE_ANALYTICS_ID' => 'UA-12345-1');
|
||||
}
|
||||
|
||||
public function testNoPageLoadsAnalytics(): void {
|
||||
foreach (array('/', '/article', '/about', '/publish', '/publish/login') as $path) {
|
||||
$body = $this->get($path)['body'];
|
||||
$this->assertStringNotContainsString('UA-12345-1', $body, $path);
|
||||
$this->assertStringNotContainsString('google-analytics', $body, $path);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user