Forum Replies Created
-
AuthorPosts
-
It is working now :) – seems it has been a caching problem.
Thanks anyway.
You can close this thread now.
BR CREverything went fine :D
Thank you for the support – you can close the thread.
BRJanuary 9, 2019 at 11:29 am in reply to: Enfold Contact Form Tracking with Google Analytics #1051729You can close it.
Thank you for your support!December 3, 2018 at 10:22 am in reply to: Enfold Contact Form Tracking with Google Analytics #1040201It’s working! :D I just needed some patience here – Thank you all for your help!
Best regards,
CRNovember 28, 2018 at 4:54 pm in reply to: Enfold Contact Form Tracking with Google Analytics #1038589Hi Victoria,
I tried the snippet form your post from 2017 as well but it seems the ga() command queue requires a ‘send’ command for the “event” hit type instead, regarding analytics.js.Additionally I defined a new goal: https://cl.ly/b5ee30edb73d and altered the snippet accordingly:
add_filter('avf_contact_form_submit_button_attr','avia_add_submit_attributes_to_cf', 10, 3);
function avia_add_submit_attributes_to_cf($att, $formID, $form_params){
$gaq = "_gaq.push(['_trackPageview', 'UA-123456789-1']);";
$att = "onclick=\"ga('send', 'event', 'Form Submit', 'Senden', 'Contact Form Submit',1);\"";
return $att;
}
There is still no conversion showing up. I think I stumbled upon a good reply of Ismael regarding tracking in an other thread some days ago but I somehow cannot find it again :/.
I also tried a plugin which sounded promising… but still no reaction.
Thanks a lot in advance.
November 28, 2018 at 11:12 am in reply to: Enfold Contact Form Tracking with Google Analytics #1038413Hi Victoria,
I tried:add_filter('avf_contact_form_submit_button_attr','avia_add_submit_attributes_to_cf', 10, 3); function avia_add_submit_attributes_to_cf($att, $formID, $form_params){ $gaq = "_gaq.push(['_trackPageview', 'UA-1xxxxxxxx-1']);"; $att = "onclick=\"ga('send', 'event', 'Senden', 'Kontakt', 'Senden');\""; return $att; }
but Analytics does not pick up sth during testing :(.
Best regards.
- This reply was modified 5 years, 12 months ago by binary_magenta.
Hi,
We want to track an user interaction as well, regarding when the form is submitted – So the click on the send-button itself. We created in GoogleAnalytics a goal as well. The contact form is displaying a message that the form has been sent, so it is not directing to a thankyou-page (which can be set up in Analytics’ goal as well).I tried “onsubmit” instead onclick as well but during testing (even in inkognito mode or different pc ) it seems not to track.
I inserted the following snippet into the child’s theme functions.php:
add_filter(‘avf_contact_form_submit_button_attr’,’avia_add_submit_attributes_to_cf’, 10, 3);
function avia_add_submit_attributes_to_cf($att, $formID, $form_params){
$gaq = “_gaq.push([‘_trackPageview’, ‘UA-111111111-1’]);\””;
$att = “onclick=\”ga(‘send’, ‘event’, ‘Senden’, ‘Kontakt’, ‘Senden’);\” “;
return $att;
}PS: UA-111111111-1 just represents the ID
PPS: I love your theme – already bought it several times.- This reply was modified 6 years ago by binary_magenta.
-
AuthorPosts