Skip to content

Commit

Permalink
odstraneni GA (#845)
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-stanek authored Mar 5, 2022
1 parent 740e24e commit 685bcd7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
6 changes: 3 additions & 3 deletions app/AdminModule/ConfigurationModule/Forms/WebFormFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,14 @@ public function create(): Form
$form->addSelect('redirectAfterLogin', 'admin.configuration.web_redirect_after_login', $redirectAfterLoginOptions)
->addRule(Form::FILLED, 'admin.configuration.web_redirect_after_login_empty');

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

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

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

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

$this->commandBus->handle(new SetSettingStringValue(Settings::FOOTER, $values->footer));
$this->commandBus->handle(new SetSettingStringValue(Settings::REDIRECT_AFTER_LOGIN, $values->redirectAfterLogin));
$this->commandBus->handle(new SetSettingStringValue(Settings::GA_ID, $values->ga_id));
// $this->commandBus->handle(new SetSettingStringValue(Settings::GA_ID, $values->ga_id));
}
}
1 change: 0 additions & 1 deletion app/WebModule/Presenters/WebBasePresenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ public function beforeRender(): void
$this->template->logo = $this->queryBus->handle(new SettingStringValueQuery(Settings::LOGO));
$this->template->footer = $this->queryBus->handle(new SettingStringValueQuery(Settings::FOOTER));
$this->template->seminarName = $this->queryBus->handle(new SettingStringValueQuery(Settings::SEMINAR_NAME));
$this->template->gaId = $this->queryBus->handle(new SettingStringValueQuery(Settings::GA_ID));

$this->template->nonregisteredRole = $this->roleRepository->findBySystemName(Role::NONREGISTERED);
$this->template->unapprovedRole = $this->roleRepository->findBySystemName(Role::UNAPPROVED);
Expand Down
11 changes: 0 additions & 11 deletions app/WebModule/Presenters/templates/@layout.latte
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,6 @@
{block scripts}
<script src="{$basePath}/dist/web/bundle.js"></script>
{/block}

{if $gaId}
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-9757753-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){ dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', {$gaId});
</script>
{/if}
</body>
</html>

Expand Down

0 comments on commit 685bcd7

Please sign in to comment.