Don't add script if logged into BE

This commit is contained in:
Marcel Kapfer 2021-05-03 19:48:34 +02:00
parent 3fd4905ea8
commit 7d22f3569b
Signed by: mmk2410
GPG key ID: CADE6F0C09F21B09

View file

@ -22,10 +22,14 @@ class PageRendererPreProcess
public function addLibrary(): void
{
if (!isset($this->tsfe)) {
return;
}
$domain = $this->getDomain();
$plausible = $this->getPlausibleURL();
if (isset($domain) && isset($plausible)) {
if (isset($domain) && isset($plausible) && !$this->tsfe->isBackendUserLoggedIn()) {
GeneralUtility::makeInstance(AssetCollector::class)
->addJavaScript(
'plausible_analytics',