fix: properly initialize CMP, GTM and data layer for tracking

This commit is contained in:
Björn Fromme
2026-01-27 21:25:03 +01:00
parent 6365e4b24c
commit 93eb08c610
12 changed files with 87 additions and 37 deletions
+2
View File
@@ -9,6 +9,7 @@
<link rel="icon" href="{{ asset('build/favicon/icon.svg') }}" type="image/svg+xml">
<link rel="apple-touch-icon" href="{{ asset('build/favicon/apple-touch-icon.png') }}">
{% if cmp_url() is not empty %}
<script>window.dataLayer = window.dataLayer || [];</script>
<script src="{{ cmp_url() }}"></script>
<script type="text/plain" data-cookiefirst-category="necessary">
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
@@ -27,5 +28,6 @@
</head>
<body class="bg-white text-gray-700 font-sans antialiased {{ booking_theme() }}"{% if not oauth2 %} hx-boost="true"{% endif %}>
{% block body %}{% endblock %}
{% block data_layer %}{% endblock %}
</body>
</html>