chore: remove google analytics
All checks were successful
Deploy / build-and-deploy (push) Successful in 2m24s
All checks were successful
Deploy / build-and-deploy (push) Successful in 2m24s
This commit is contained in:
parent
08f6b034f5
commit
57b91b81d3
2 changed files with 0 additions and 17 deletions
|
|
@ -63,10 +63,6 @@ templ Base(props ...SEOProps) {
|
|||
@htmxCSRFScript()
|
||||
// Form submit spinner for non-HTMX forms
|
||||
@formSubmitScript()
|
||||
// Google Analytics
|
||||
if cfg := ctxkeys.Config(ctx); cfg != nil && cfg.GoogleMeasuringID != "" {
|
||||
@googleAnalyticsScript(cfg.GoogleMeasuringID)
|
||||
}
|
||||
</head>
|
||||
<body class="min-h-screen">
|
||||
{ children... }
|
||||
|
|
@ -128,14 +124,3 @@ templ htmxCSRFScript() {
|
|||
templ formSubmitScript() {
|
||||
<script src="/assets/js/form-submit.js"></script>
|
||||
}
|
||||
|
||||
templ googleAnalyticsScript(id string) {
|
||||
<script async src={ "https://www.googletagmanager.com/gtag/js?id=" + id }></script>
|
||||
<script type="text/javascript">
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
window.gtag = gtag;
|
||||
gtag('js', new Date());
|
||||
gtag('config', {{ id }});
|
||||
</script>
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue