• Resolved alextester

    (@alextester)


    Hi, how can I add this code to my submit button so that Google Analytics can track contact form submissions please?

    onClick=”ga(‘send’, ‘event’, { eventCategory: ‘Contact Form’, eventAction: ‘Send Message’, eventLabel: ‘Contact Form’, eventValue: 0});”

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello @alextester ,

    I have checked and our developers recommended using this code for tracking submits in GA:

    <script>
    jQuery('form#forminator-module-21').on('forminator:form:submit:success', function (e) { 
       ga('send', 'event', 'Form Title', 'submit');
     });
    </script>

    You will need to change form#forminator-module-21 to ID of your form.

    kind regards,
    Kasia

    Thread Starter alextester

    (@alextester)

    Thank you Kasia!

    Alex

    Thread Starter alextester

    (@alextester)

    Hi Kasia,

    Unfortunately, this code hasn’t worked – I did double-check the ID was correct. I added the code to the footer.

    Alex

    Plugin Support Imran – WPMU DEV Support

    (@wpmudev-support9)

    Hello @alextester ,

    Hope you’re doing well!

    Please try adding the code into the header. Google Tag Manager code needs to be located between the <hear> ..</head> section.

    Let us know how it went!

    Kind regards,
    Nastia

    Thread Starter alextester

    (@alextester)

    Hi Nastia,

    Thanks for you’re continuing help. I’ve moved the script to the <head> but submitting the form still won’t trigger an event unfortunately!

    view-source:https://wollastonconstruction.co.uk/

    Any more ideas?

    Best,

    Alex

    Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello @alextester ,

    Let me consult this with developers and they will see what could be the problem.

    We will keep you updated.

    kind regards,
    Kasia

    Plugin Support Dimitris – WPMU DEV Support

    (@wpmudev-support6)

    Hello @alextester

    Could you please send me an email to [email protected] using this template:

    Subject: “Attn: Dimitris

    Message: link back to this thread for reference

    Keep in mind the subject line as ensures that it gets assigned to me.

    Thank you,
    Dimitris

    Thread Starter alextester

    (@alextester)

    Hi Dimitris, I have done so. Thank you for looking into this.

    Alex

    Plugin Support Imran – WPMU DEV Support

    (@wpmudev-support9)

    Hello @alextester ,

    I trust you’re doing well!

    We’ve not heard from you in a while. I’ve marked this ticket as resolved for now, but if you need anything else at all, we’re here for you, please just reopen the ticket or create a new one.

    Have a good day and take care!

    Kind regards,
    Nastia

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Add Google Analytics event tracking code to submit button’ is closed to new replies.