WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Google Tracking Code in Additional Settings Causes Form Submission to Fail

[Resolved] Google Tracking Code in Additional Settings Causes Form Submission to Fail

  • Hi,

    I used the technique suggested in your article here http://contactform7.com/tracking-form-submissions-with-google-analytics/

    However, I found that is caused the form submission to break. When a user would click submit the “loading” animation would spin for a second then disappear without a confirmation message appearing and, in the end, the form did not send.

    I tried two versions of the analytics code. I first tried the code as: on_sent_ok: "_gaq.push(['_trackEvent', 'Contact Form', 'Submit']);" and this as: on_sent_ok: "ga(‘send’, ‘event’, ‘Contact Form’, ‘submit’);”

    If I remove this code it works perfectly. I’m currently running 3.6.1 but also had this issue on 3.7 (I had updated to 3.7 but reinstalled WordPress when I though the form submission was failing because the plug-in wasn’t compatible with the new version).

    Any idea what may be happening?

    http://wordpress.org/plugins/contact-form-7/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Takayuki Miyoshi
    Participant

    @takayukister

    Can I see the site?

    The issue was actually in the single quotes. We had been given the code from our client’s SEO company in a Word document. The single quotes were formatted poorly. This does not seem to be an issue on your end after all. Thank you for the speedy replay.

    Hi Impolex,

    Please can you explain what you mean by “The single quotes were formatted poorly. This does not seem to be an issue on your end after all.”

    I have had the exact same issue you have described above. If you can shed any light on this that would be great. Thanks,

    Q

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] Google Tracking Code in Additional Settings Causes Form Submission to Fail’ is closed to new replies.