Google Analytics snippet breaks Ajax functionality
-
Hi!
I’ve noticed that on my WordPress installation when I add this snippet
on_sent_ok: "_gaq.push(['_trackEvent', 'Contact Form', 'Submit']);"in the ‘Additional Settings’ field Ajax notifications about successful or failed message sending stop appearing.
On the web you can find a ‘solution’, change line 10 of wp-content/plugins/contact-form-7/includes/js/scipts.js from:
$('div.wpcf7 > form').wpcf7InitForm();to
$('div.wpcf7-form > form').wpcf7InitForm();but this is a bad solution since it breaks Ajax functionality completely and the whole page reloads.
Any suggestions how to fix this?
The topic ‘Google Analytics snippet breaks Ajax functionality’ is closed to new replies.