Don't add script if logged into BE
This commit is contained in:
parent
3fd4905ea8
commit
7d22f3569b
1 changed files with 5 additions and 1 deletions
|
@ -22,10 +22,14 @@ class PageRendererPreProcess
|
||||||
|
|
||||||
public function addLibrary(): void
|
public function addLibrary(): void
|
||||||
{
|
{
|
||||||
|
if (!isset($this->tsfe)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$domain = $this->getDomain();
|
$domain = $this->getDomain();
|
||||||
$plausible = $this->getPlausibleURL();
|
$plausible = $this->getPlausibleURL();
|
||||||
|
|
||||||
if (isset($domain) && isset($plausible)) {
|
if (isset($domain) && isset($plausible) && !$this->tsfe->isBackendUserLoggedIn()) {
|
||||||
GeneralUtility::makeInstance(AssetCollector::class)
|
GeneralUtility::makeInstance(AssetCollector::class)
|
||||||
->addJavaScript(
|
->addJavaScript(
|
||||||
'plausible_analytics',
|
'plausible_analytics',
|
||||||
|
|
Loading…
Reference in a new issue