Contact Form 7
[resolved] Google Tracking Code in Additional Settings Causes Form Submission to Fail (4 posts)

  1. impolex
    Posted 2 years ago #


    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?


  2. Takayuki Miyoshi
    Plugin Author

    Posted 2 years ago #

    Can I see the site?

  3. impolex
    Posted 2 years ago #

    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.

  4. QwizdomUK
    Posted 2 years ago #

    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,


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Contact Form 7
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic