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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,6 @@ SITE_URL=https://site.test
|
||||
RECAPTCHA_SITE_KEY=test-site-key
|
||||
RECAPTCHA_PROJECT_ID=test-project
|
||||
RECAPTCHA_API_KEY=test-api-key
|
||||
GOOGLE_ANALYTICS_ID=
|
||||
UPLOAD_DIR=
|
||||
UPLOAD_DIR_LIMIT_MB=1
|
||||
DISPLAY_ERRORS=
|
||||
|
||||
Reference in New Issue
Block a user