Tagged: CONTACT FORM, google analytics
Hi,
How can I track Enfold’s contact form submissions / conversions with a Google Analytics goal?
I found a topic about this, but it doesn’t redirect properly: https://kriesi.at/support/?post_type=topic&p=351281
Thank you,
Ralph
Hey Ralph!
Try the following:
https://kriesi.at/support/topic/tracking-code-on-specific-button/#post-335355
The code to use in case of the form would be like this:
$('.avia_ajax_form .button').on('click', function() {
ga('send', 'event', 'button', 'click', 'button-3');
});
Best regards,
Josue
Thank you, Josue!
I used this topic as a reference as well: https://kriesi.at/support/topic/please-clear-this-up-for-em-ga-tracking-2/
Kind regards,
Ralph
Great, let me know if you have additional questions.
Best regards,
Josue
Hi Josue,
Everything is tested and working :)
@ people using the ‘Google Analytics by Yoast’ plugin:
Initially GA didn’t track anything and thanks to Firebug I found out that ‘ga’ was not defined. I use the ‘Google Analytics by Yoast’ plugin to insert the GA Universal code and it defines ‘__gaTracker’ instead of the standard ‘ga’. So, in order to get the tracking code to work, I had to change it to:
$('.avia_ajax_form .button').on('click', function() {
__gaTracker('send', 'event', 'button', 'click', 'button-3');
});
A great GA goal tracking testing method:
Also, a great way to test events and other type of GA goals, is to login to GA > Reporting tab > Real-Time > Events and Conversions. Make sure to not filter your own traffic and you’ll be able to see real-time, whether button clicks and form submissions are being tracked. For reference: https://support.google.com/analytics/answer/1008083?hl=en
Hope this helps someone :)
Thanks again,
Ralph
You are welcome Ralph, and thanks for sharing your experience.
Cheers!
Josue