Skip to content

Commit 685bcd7

Browse files
authored
odstraneni GA (#845)
1 parent 740e24e commit 685bcd7

File tree

3 files changed

+3
-15
lines changed

3 files changed

+3
-15
lines changed

app/AdminModule/ConfigurationModule/Forms/WebFormFactory.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,14 @@ public function create(): Form
8888
$form->addSelect('redirectAfterLogin', 'admin.configuration.web_redirect_after_login', $redirectAfterLoginOptions)
8989
->addRule(Form::FILLED, 'admin.configuration.web_redirect_after_login_empty');
9090

91-
$form->addText('ga_id', 'admin.configuration.web_ga_id');
91+
// $form->addText('ga_id', 'admin.configuration.web_ga_id');
9292

9393
$form->addSubmit('submit', 'admin.common.save');
9494

9595
$form->setDefaults([
9696
'footer' => $this->queryBus->handle(new SettingStringValueQuery(Settings::FOOTER)),
9797
'redirectAfterLogin' => array_key_exists($redirectAfterLoginValue, $redirectAfterLoginOptions) ? $redirectAfterLoginValue : null,
98-
'ga_id' => $this->queryBus->handle(new SettingStringValueQuery(Settings::GA_ID)),
98+
// 'ga_id' => $this->queryBus->handle(new SettingStringValueQuery(Settings::GA_ID)),
9999
]);
100100

101101
$form->onSuccess[] = [$this, 'processForm'];
@@ -122,6 +122,6 @@ public function processForm(Form $form, stdClass $values): void
122122

123123
$this->commandBus->handle(new SetSettingStringValue(Settings::FOOTER, $values->footer));
124124
$this->commandBus->handle(new SetSettingStringValue(Settings::REDIRECT_AFTER_LOGIN, $values->redirectAfterLogin));
125-
$this->commandBus->handle(new SetSettingStringValue(Settings::GA_ID, $values->ga_id));
125+
// $this->commandBus->handle(new SetSettingStringValue(Settings::GA_ID, $values->ga_id));
126126
}
127127
}

app/WebModule/Presenters/WebBasePresenter.php

-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ public function beforeRender(): void
8686
$this->template->logo = $this->queryBus->handle(new SettingStringValueQuery(Settings::LOGO));
8787
$this->template->footer = $this->queryBus->handle(new SettingStringValueQuery(Settings::FOOTER));
8888
$this->template->seminarName = $this->queryBus->handle(new SettingStringValueQuery(Settings::SEMINAR_NAME));
89-
$this->template->gaId = $this->queryBus->handle(new SettingStringValueQuery(Settings::GA_ID));
9089

9190
$this->template->nonregisteredRole = $this->roleRepository->findBySystemName(Role::NONREGISTERED);
9291
$this->template->unapprovedRole = $this->roleRepository->findBySystemName(Role::UNAPPROVED);

app/WebModule/Presenters/templates/@layout.latte

-11
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,6 @@
6868
{block scripts}
6969
<script src="{$basePath}/dist/web/bundle.js"></script>
7070
{/block}
71-
72-
{if $gaId}
73-
<!-- Global site tag (gtag.js) - Google Analytics -->
74-
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-9757753-1"></script>
75-
<script>
76-
window.dataLayer = window.dataLayer || [];
77-
function gtag(){ dataLayer.push(arguments);}
78-
gtag('js', new Date());
79-
gtag('config', {$gaId});
80-
</script>
81-
{/if}
8271
</body>
8372
</html>
8473

0 commit comments

Comments
 (0)