WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. impolex
    Member
    Posted 8 months ago #

    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/

  2. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 8 months ago #

    Can I see the site?

  3. impolex
    Member
    Posted 8 months 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
    Member
    Posted 7 months 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,

    Q

Reply

You must log in to post.

About this Plugin

About this Topic