Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #23853

    I need to be able to track form submissions from my contact page. There’s no URL redirect option for a “Thank You” page – which is fine, but I’m instead going to have to use event tracking in Google Analytics to see that these submissions are properly accounted for.

    Can you please tell me where I need to go in the Choices theme to add the code (below). I know where it would go in the HTML itself, but unsure where to go to customize it in the theme.




    The onclick attribute is a simple attribute which can be added to the input tag. In wp-contentthemesenfoldframeworkphpclass-form-generator.php replace

    $this->output .= '<input type="submit" value="'.$this->form_params['submit'].'" class="button" />';


    $this->output .= '<input type="submit" onClick="_gaq.push(['_trackEvent', 'Contact', 'Form Submission', 'Contact Page Form',, false]);" value="'.$this->form_params['submit'].'" class="button" />';


    Great! GA is now tracking the submissions. It looks like this has changed the button text, but I think I can take care of that.

    Thanks guys.

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Adding Event Tracking To Choices Contact Form’ is closed to new replies.