• Hi,

    I’m having a problem with the success message not showing on my contact forms despite the messages feeding through into our email. I’ve had a look through the forums and can see that some people have had similar issues when they had GA event tracking set up on the forms. We’ve had event tracking on the forms for a long time and have never had any problems with success messages until now. Since updating to WP 4.7 it seems to be problematic. The last thread about this seemed to suggest that removing GA code from the additional settings would fix this. Unfortunately that is not really a solution as we need to be tracking email sends.

    There are multiple contact forms on the site but one can be found here: https://www.vinylrevolution.co.uk/vinyl/about/contact/

    I would really appreciate any information regarding this. Thanks!

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter vinylrevolution

    (@vinylrevolution)

    For more info the script breaking is clearly related to gaTracker but I don’t understand as it was working fine until recently.. Here is the error showing in the console

    VM138:1 Uncaught ReferenceError: __gaTracker is not defined(…)(anonymous function) @ VM138:1(anonymous function) @ autoptimize_46349d9….js:91each @ jquery.js?ver=1.12.4:2$.wpcf7AjaxSuccess @ autoptimize_46349d9….js:91t.success @ autoptimize_46349d9….js:84i @ jquery.js?ver=1.12.4:2fireWith @ jquery.js?ver=1.12.4:2y @ jquery.js?ver=1.12.4:4c @ jquery.js?ver=1.12.4:4

    check what happens when adding ?ao_noptimize=1 to the URL (which disables AO for that request).

    frank

    Thread Starter vinylrevolution

    (@vinylrevolution)

    Thanks for your quick reply Frank! Sorry if this is a dumb question but could you clarify where I need to put that additional bit of code?

    Right now the code I have in my additional settings for tracking AdWords and Bing looks like this:

    on_sent_ok: “__gaTracker(‘send’, ‘event’, ‘Banners’, ‘sent’); window.uetq = window.uetq || []; window.uetq.push({ ‘ec’: ‘Banners’, ‘ea’: ‘sent’});”

    you simply have to add it to the URL of the page with a contact form. doing so will disable autoptimize for that request, which will allow for a more specific JS error and which might even fix the problem (in which case you might have to do autoptimize troubleshooting as per the FAQ) ??

    Thread Starter vinylrevolution

    (@vinylrevolution)

    Thanks for clarifying that! Unfortunately I completely disabled auto-optimise and the success message was still not working. Console still showed the following message: Uncaught ReferenceError: __gaTracker is not defined(…)

    well, that way we at least know the problem isn’t related to autoptimize, I hope the contact form 7 people can help beyond that.

    I’m having the same problem. When the GA tracking code is installed, the form is sent, but there is no success message. When I remove the GA tracking code, the success message appears as expected.

    Thread Starter vinylrevolution

    (@vinylrevolution)

    This appears to be a common problem and I’m surprised there is no one with a fix. If anyone knows of a solution that doesn’t involve removing the GA tracking code I’d appreciate any input. Removing the tracking will make understanding our AdWords data impossible so is not really a solution.

    I found a solution that worked for me, on one site that I manage. I haven’t yet rolled this out to other sites to see if it works, but on the one site that I first discovered the problem yesterday, I was getting the same error message as you about the ga “not defined.”

    On examining things further, I found that I had moved the main Google Analytics tracking code to the footer for page speed purposes. When I put the main Google Analytics tracking code back in the header, the success message started appearing again.

    I’ll be trying this & testing it on some additional sites today.

    Olá, realmente sonjaray tem raz?o, o problema é a localiza??o do código no analytics, eu alterei e a mensagem de sucesso após envio do formulário foi exibida corretamente.

    Muito Obrigado.

    I tried everything I could find.

    Solution was this pluging -> Contact Form 7 Google Analytics

    I tried gaTracker code change and all other suggestions. Then I found a post stating that on_send_ok is being killed off which led me to another search that found this plug in.

    Finally fixed my problem and stopped me pulling my hair out hence this post and the review i left for it!

    Use an inspector and you’ll see it working on https://dpphydronics.com.au

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Contact Form 7 Success Message Not Showing (need to keep GA tracking)’ is closed to new replies.