diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/GroupsPriceCalculator.vue b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/GroupsPriceCalculator.vue index 4a48646b..4b95cd6f 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/GroupsPriceCalculator.vue +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/GroupsPriceCalculator.vue @@ -374,6 +374,10 @@ export default { this.formErrors = response.data.errors; } else { this.submitted = true; + window.dataLayer = window.dataLayer || []; + dataLayer.push({ + 'event': 'Preisberechnung' + }) } }).catch(error => { }).finally(() => { diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/controllers/datalayer_controller.js b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/controllers/datalayer_controller.js new file mode 100644 index 00000000..e8c6e163 --- /dev/null +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/controllers/datalayer_controller.js @@ -0,0 +1,14 @@ +import { Controller } from 'stimulus' + +export default class extends Controller { + + static values = [ 'event' ] + + trigger() { + window.dataLayer = window.dataLayer || [] + dataLayer.push({ + 'event': this.eventValue, + }) + } + +}