Implement proper conversion tracking

This commit is contained in:
Björn Fromme
2018-11-19 12:16:47 +01:00
parent e20469de48
commit 06eaf37f57
5 changed files with 9 additions and 19 deletions
@@ -205,14 +205,9 @@
this.formErrors = {}; this.formErrors = {};
}, },
trackConversion () { trackConversion () {
window.google_trackConversion({ ga('create', 'UA-230208-3') ;
google_conversion_id: 1072535457, ga('send', 'event', 'Formular', 'Abschicken');
google_conversion_language: "en", gtag('event', 'conversion', { 'send_to': 'AW-1072535457/BScCCKyEtocBEKGvtv8D' });
google_conversion_format: "1",
google_conversion_color: "ffffff",
google_conversion_label: "lead",
google_conversion_value: 0
});
} }
}, },
computed: { computed: {
@@ -54,14 +54,9 @@
this.$session.set('formData', this.formData); this.$session.set('formData', this.formData);
}, },
trackConversion () { trackConversion () {
window.google_trackConversion({ ga('create', 'UA-230208-3') ;
google_conversion_id: 1072535457, ga('send', 'event', 'Formular', 'Abschicken');
google_conversion_language: "en", gtag('event', 'conversion', { 'send_to': 'AW-1072535457/BScCCKyEtocBEKGvtv8D' });
google_conversion_format: "1",
google_conversion_color: "ffffff",
google_conversion_label: "lead",
google_conversion_value: 0
});
} }
}, },
watch: { watch: {
@@ -276,7 +276,7 @@
alt="Processing..."> alt="Processing...">
</div> </div>
<div class="configurator__overlay" v-if="success" @click.prevent="resetForm()"> <div class="configurator__overlay" v-if="success" @click.prevent="resetForm()">
<p class="form__overlay__text"><strong>{f:translate(key: 'tx_epevents.label.configurator_thank_you', extensionName: 'EpEvents') -> f:format.raw()}</strong></p> <p class="form__overlay__text"><strong class="form-success">{f:translate(key: 'tx_epevents.label.configurator_thank_you', extensionName: 'EpEvents') -> f:format.raw()}</strong></p>
</div> </div>
<div class="configurator__overlay" v-if="error"> <div class="configurator__overlay" v-if="error">
<strong>{f:translate(key: 'tx_epevents.label.error_occured', extensionName: 'EpEvents') -> f:format.raw()}</strong> <strong>{f:translate(key: 'tx_epevents.label.error_occured', extensionName: 'EpEvents') -> f:format.raw()}</strong>
@@ -101,7 +101,7 @@
<img src="{f:uri.resource(path: 'images/spinner_default.gif', extensionName: 'ep_events')}" alt="Processing..."> <img src="{f:uri.resource(path: 'images/spinner_default.gif', extensionName: 'ep_events')}" alt="Processing...">
</div> </div>
<div class="form__overlay" v-show="success"> <div class="form__overlay" v-show="success">
<p class="form__overlay__text"><strong>{f:translate(key: 'tx_epevents.label.contact_form_thank_you', extensionName: 'EpEvents') -> f:format.raw()}</strong></p> <p class="form__overlay__text"><strong class="form-success">{f:translate(key: 'tx_epevents.label.contact_form_thank_you', extensionName: 'EpEvents') -> f:format.raw()}</strong></p>
<p class="form__overlay__text"> <p class="form__overlay__text">
<a class="form__button" href="{v:site.url()}" <a class="form__button" href="{v:site.url()}"
title="{f:translate(key: 'tx_epevents.label.contact_form_continue')}"> title="{f:translate(key: 'tx_epevents.label.contact_form_continue')}">
@@ -89,7 +89,7 @@
<img src="{f:uri.resource(path: 'images/spinner_box.gif', extensionName: 'ep_events')}" alt="Processing..."> <img src="{f:uri.resource(path: 'images/spinner_box.gif', extensionName: 'ep_events')}" alt="Processing...">
</div> </div>
<div class="form__overlay" v-show="success"> <div class="form__overlay" v-show="success">
<strong>{f:translate(key: 'tx_epevents.label.contact_form_thank_you', extensionName: 'EpEvents') -> f:format.raw()}</strong> <strong class="form-success">{f:translate(key: 'tx_epevents.label.contact_form_thank_you', extensionName: 'EpEvents') -> f:format.raw()}</strong>
</div> </div>
<div class="form__overlay" v-show="error"> <div class="form__overlay" v-show="error">
<strong>{f:translate(key: 'tx_epevents.label.error_occured', extensionName: 'EpEvents') -> f:format.raw()}</strong> <strong>{f:translate(key: 'tx_epevents.label.error_occured', extensionName: 'EpEvents') -> f:format.raw()}</strong>