This topic has 4 replies, 2 voices, and was last updated 9 years, 1 month ago by Anonymous.
Tagged: goal tracking, google analytics, tag manager
Viewing 5 posts - 1 through 5 (of 5 total)
Hi,
I am trying to set up goal tracking on the booking form submissions. I use Google Tag Manager to track events. I used Contact Form 7 on the contact page and it tracks the events and converts them to goals in analytics. However, I cannot set goal tracking for your booking forms. Is there a way to do it?
Once we can track the form submissions, then it will be easy for us to see which campaigns work best, saving us $$$.
If you want to set up the goal tracking in booking form page, then this is the template file template-booking.php, you can edit this file to set up the goal tracking. We don’t know exactly about the goal tracking plugin.
I am trying to implement a custom dataLayer.push() into the callback function which is invoked upon a successful submission. The piece of code could be something like:
function onFormSuccess(event) {
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
‘event’ : ‘formSubmissionSuccess’,
‘formId’ : ‘contactForm’
});
// Rest of the success callback code
}
Where do i add this?
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic.