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

    Hi,

    I am in the process of setting up event tracking for button clicks of the contact forms that I have on the site.

    This post makes sense for the most part: https://kriesi.at/support/topic/tracking-code-on-specific-button/#post-335355

    Only complication is that I have 2 forms and as such would like to measure them individually. I figure that at the moment the submit buttons of both forms have the same class ( class=”button” ). And as such if i’d use this class in the ga script i wouldn’t be able to identify which form has been submitted.

    How can i target the different buttons of each of the 2 forms in order to measure each form submit individually?

    #662334

    Hey clairemartindigital,

    Thank you for using Enfold.

    Are you using the theme’s contact form element or shortcode? Add a custom css class attribute to the contact form. Use the selector and prepend it to the button selector. You have to enable the custom css class field first:

    Best regards,
    Ismael

    #662341

    Hi Ismael,

    yes, i am using the enfold contact form element. 2 different forms on the site.

    Can you elaborate on “prepend it to the button selector” or even better give me an example? The custom class bit is all clear.

    Thanks

    #663660

    Hi,

    Please try the code provided in the previous thread above but instead of the “.button-1 a”, you have to prepend the custom css class attribute of the contact form. The css selector should be “.customcssclass .button-1 a”.

    Best regards,
    Ismael

    #737053

    you can close this one. thx

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Contact Form tracking – classes for buttons of different forms’ is closed to new replies.