• I found an old post where someone was asking about this, but the plugin author suggested a workaround. That was at least a year old, however, and I wanted to ask if we could have a solution implemented that would allow us to track events in Google Analytics without having to use a page redirect.

    I know page redirects are one way to do this, but there is a better solution available if we can have a form execute a piece of Javascript code like this when submitted:

    _gaq.push(['_trackEvent', 'Button Clicks', 'Products', 'The blue button on the form page']);

    I am able to do this in the plugin called Contact Forms 7 using the additional settings field at the bottom of any form. Could we get similar support for Visual Form Builder?

    I have a couple forms on the site that are better in VFB, so I don’t want to have to abandon the plugin in order to keep getting good marketing data about where conversions are coming from.

    Thanks,
    Luke

    https://wordpress.org/plugins/visual-form-builder/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Matthew Muro

    (@mmuro)

    If you are executing JS, why not just do that in jQuery?

    The reason you want to use a redirect is because that’s the best and most accurate way to ensure you are tracking the events. When using JS you can never be 100% sure. From what I’ve found online, you’d have to delay the submit action a little bit to make sure the “trackEvent” gets sent.

    Thread Starter Viperior

    (@viperior)

    Thanks so much for replying, Matthew! I’m open to using jQuery, but I could use some guidance on how to do so using VFB. I have only dabbled a tiny bit in jQuery so far. Where should I start in order to set up this kind of solution without requiring additional confirmation pages?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Request for Google Analytics Event Tracking’ is closed to new replies.