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

This commit is contained in:
Björn Fromme
2026-03-16 12:02:59 +01:00
parent e5803860df
commit 9eefdd1858
12 changed files with 87 additions and 37 deletions
@@ -95,10 +95,6 @@
</div>
</div>
{% include '_partials/_tracking.html.twig' with {
'url': '/trichter_Z1/schritt0_login_oder_gast',
'title': 'Login oder Gast'
} %}
{% endblock %}
{% block footer %}
@@ -112,3 +108,10 @@
</button>
</div>
{% endblock %}
{% block data_layer %}
{% include '_partials/_tracking.html.twig' with {
'url': '/trichter_Z1/schritt0_login_oder_gast',
'title': 'Login oder Gast'
} %}
{% endblock %}
@@ -101,6 +101,9 @@
</div>
{{ form_rest(form) }}
{{ form_end(form) }}
{% endblock %}
{% block data_layer %}
{% include '_partials/_tracking.html.twig' with {
'url': '/trichter_Z1/schritt1_zimmerauswahl',
'title': 'Zimmerauswahl'
@@ -75,6 +75,9 @@
</div>
{{ form_rest(form) }}
{{ form_end(form) }}
{% endblock %}
{% block data_layer %}
{% include '_partials/_tracking.html.twig' with {
'url': '/trichter_Z1/schritt2_teilnehmende_leistungen',
'title': 'Teilnehmende und Leistungen'
@@ -85,6 +85,9 @@
</div>
{{ form_rest(form) }}
{{ form_end(form) }}
{% endblock %}
{% block data_layer %}
{% include '_partials/_tracking.html.twig' with {
'url': '/trichter_Z1/schritt3_zahlungsart',
'title': 'Zahlungsart'
@@ -567,6 +567,9 @@
</div>
{{ form_rest(form) }}
{{ form_end(form) }}
{% endblock %}
{% block data_layer %}
{% include '_partials/_tracking.html.twig' with {
'url': '/trichter_Z1/schritt4_uerbersicht_bestaetigung',
'title': 'Übersicht und Bestätigung'
@@ -55,6 +55,9 @@
</div>
</div>
{% endblock %}
{% block data_layer %}
{% if bookingTotal is not null and travelName is not null %}
<script>
window.dataLayer = window.dataLayer || [];