Hi Guys, I am trying to get Google Tag Manager to work in enfold for submit buttons. I used the code from here: http://kriesi.at/documentation/enfold/add-onclick-event-to-the-contact-form-submit-button/
But slightly modified to below. Well its working fine in Chrome but no other browser. Is this beyond the support form here.?
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){
$att = "onclick=\" dataLayer.push({'event': 'form-submission', 'formName' : 'Contact Us'}); \"";
return $att;
}
Thanks
Hi LifeIsNow001,
On what page are you trying to implement this? Please post a link so that we can have a closer look.
Thanks,
Rikard
Hi Guys, here’s the website http://coolstuffstudios.com/contact/
If you scroll down you will see submit buttons for the email forms. Those are what I need to track in GTM. It seems to work a bit in Chome, but I can’t get it to work in IE or FF. Any insight would be awesome.
Thanks
Hi,
Unfortunately it would require quite some time and customization of the theme to achieve this, so I am sorry to tell you that this is not covered by our support. However if its really important for you to get this done, you can always hire a freelancer to do the job for you :)
Best regards,
Andy
Thank you, I actually got it working, there was a cache program on the site messing with me.
Thank you for your time