WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
[resolved] Form Submission to Fail Because Of Google Tracking Code in Additional Settings (5 posts)

  1. wallaroomedia
    Member
    Posted 6 months ago #

    Hi,

    After I put in this line of code
    - on_sent_ok: "_gaq.push(['_trackEvent', 'Contact Form', 'Submit']);"
    in the additional settings, the form submission is working but not 100%. I mean the form is still sent but the page didn't show the successfully sent message anymore. The loading icon just spinning and then disappear.

    Here is the link for my form: http://mwranches.com/property-brochure/

    Please help me to resolve this issue. Thanks

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

  2. buzztone
    Member
    Posted 6 months ago #

    The spinning arrow is a common symptom of a Javascript conflict with either your current WordPress theme or one of the other plugins you are using - see Contact Form 7 Email Issues - there is a link there that covers Javascript Conflicts.

  3. wallaroomedia
    Member
    Posted 6 months ago #

    Thank you for your reply. If the plugin works totally fine before inserting that on send ok line, would it still be the js conflict problem?

  4. wallaroomedia
    Member
    Posted 6 months ago #

    This may help, I turned on the inspect element while submitting the form, and here is the error I got "Uncaught ReferenceError: _gaq is not defined "

  5. buzztone
    Member
    Posted 6 months ago #

    RE: If the plugin works totally fine before inserting that on send ok line, would it still be the js conflict problem?

    Definitely - when you add on_sent_ok: "_gaq.push(['_trackEvent', 'Contact Form', 'Submit']);" you are adding some Javascript which you want CF7 to run when the form completes sending.

    CF7's Javascript starts running and indicates this by the spinning arrow. But it never completes due to a Javascript conflict somewhere on your page.

    "Uncaught ReferenceError: _gaq is notdefined " confirms you have a Javascript Conflict.

    Use the link I gave you earlier to investigate.

Reply

You must log in to post.

About this Plugin

About this Topic