Configuration and remove google analytics extension by modern method in layout html

This commit is contained in:
2026-05-22 09:25:36 +02:00
parent c852782a13
commit e3415dbabb
3 changed files with 52 additions and 9 deletions
+13
View File
@@ -0,0 +1,13 @@
{% extends "!layout.html" %}
{% block extrahead %}
{{ super() }}
<!-- Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id={{ googleanalytics_id }}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '{{ googleanalytics_id }}');
</script>
{% endblock %}