Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #712134

    I want to track when a user enters details then clicks the ‘Submit’ button from AdWords. I have been given the code I need to add but I don’t know where to add it.

    I need to change this:

    <input type=”submit” value=”Submit” class=”button” data-sending-label=”Sending”>

    to this:

    <input type=”submit” value=”Submit” class=”button” data-sending-label=”Sending”>onClick=”ga(‘send’,’event’,’Request A Quote’,’Submit Button’,’/underfloor-heating-system-quote’);”

    Thank you

    #712147

    Hey pachanights!

    Please refer to this post – http://kriesi.at/documentation/enfold/add-onclick-event-to-the-contact-form-submit-button/

    Best regards,
    Yigit

    #712161

    Thanks Yigit, I’ve read that post already and still not clear where the file is to add the code to

    #712198

    Hi!

    Insert this code into the child theme functions.php file and the rest will be done.

    Thanks a lot

    Best regards,
    Basilis

    #712204

    Hi!

    Please try adding the code to functions.php file in Appearance > Editor

    
    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=\"ga('send','event','Request A Quote','Submit Button','/underfloor-heating-system-quote');\"";
      return $att;
    }

    Cheers!
    Yigit

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.