Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #694154

    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

    #694281

    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

    #694809

    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

    #696435

    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

    #696716

    Thank you, I actually got it working, there was a cache program on the site messing with me.

    Thank you for your time

    #696857

    Hi,

    Great, glad you found the problem :-)

    Please open a new thread if you should have any further questions or problems.

    Best regards,
    Rikard

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘GTM for submit button only working in Chrome’ is closed to new replies.