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
|
|
@ -13,10 +13,8 @@ func SecurityHeaders() func(http.Handler) http.Handler {
|
||||||
|
|
||||||
h.Set("Content-Security-Policy",
|
h.Set("Content-Security-Policy",
|
||||||
"default-src 'self'; "+
|
"default-src 'self'; "+
|
||||||
"script-src 'self' 'unsafe-inline' https://www.googletagmanager.com; "+
|
|
||||||
"style-src 'self' 'unsafe-inline'; "+
|
"style-src 'self' 'unsafe-inline'; "+
|
||||||
"img-src 'self' data:; "+
|
"img-src 'self' data:; "+
|
||||||
"connect-src 'self' https://www.google-analytics.com; "+
|
|
||||||
"font-src 'self'; "+
|
"font-src 'self'; "+
|
||||||
"frame-ancestors 'none'; "+
|
"frame-ancestors 'none'; "+
|
||||||
"base-uri 'self'; "+
|
"base-uri 'self'; "+
|
||||||
|
|
|
||||||
|
|
@ -63,10 +63,6 @@ templ Base(props ...SEOProps) {
|
||||||
@htmxCSRFScript()
|
@htmxCSRFScript()
|
||||||
// Form submit spinner for non-HTMX forms
|
// Form submit spinner for non-HTMX forms
|
||||||
@formSubmitScript()
|
@formSubmitScript()
|
||||||
// Google Analytics
|
|
||||||
if cfg := ctxkeys.Config(ctx); cfg != nil && cfg.GoogleMeasuringID != "" {
|
|
||||||
@googleAnalyticsScript(cfg.GoogleMeasuringID)
|
|
||||||
}
|
|
||||||
</head>
|
</head>
|
||||||
<body class="min-h-screen">
|
<body class="min-h-screen">
|
||||||
{ children... }
|
{ children... }
|
||||||
|
|
@ -128,14 +124,3 @@ templ htmxCSRFScript() {
|
||||||
templ formSubmitScript() {
|
templ formSubmitScript() {
|
||||||
<script src="/assets/js/form-submit.js"></script>
|
<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