Title: Analytics code not working
Last modified: August 22, 2016

---

# Analytics code not working

 *  [cacplus](https://wordpress.org/support/users/robruun/)
 * (@robruun)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/analytics-code-not-working/)
 * I inserted the following code into the form in CF7 v. 4.1
 * `on_sent_ok: "_gaq.push(['_trackEvent', 'Contact Form', 'Submit']);"`
 * but Google Analytics doesn’t track it after submitting the form. Any idea what
   the problem can be?
 * [https://wordpress.org/plugins/contact-form-7/](https://wordpress.org/plugins/contact-form-7/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [cacplus](https://wordpress.org/support/users/robruun/)
 * (@robruun)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/analytics-code-not-working/#post-5803986)
 * Sorry forgot to mention my site: [http://www.cacplus.com/](http://www.cacplus.com/ca/contactar/)
 *  [Neil Murray](https://wordpress.org/support/users/buzztone/)
 * (@buzztone)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/analytics-code-not-working/#post-5804101)
 * See [https://wordpress.org/support/topic/success-message-not-showing-2](https://wordpress.org/support/topic/success-message-not-showing-2)
 *  Thread Starter [cacplus](https://wordpress.org/support/users/robruun/)
 * (@robruun)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/analytics-code-not-working/#post-5804162)
 * Hi buzztone,
 * I already saw that post but it doesn’t solve my problem. Any other proposal?
 * Robert
 *  [Neil Murray](https://wordpress.org/support/users/buzztone/)
 * (@buzztone)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/analytics-code-not-working/#post-5804194)
 * This could be due to a Javascript conflict with either your current WordPress
   theme or one of the other plugins you are using – see [Contact Form 7 Email Issues](http://contactform7.com/faq/#Contact_Form_7_Email_Issues)–
   there is a link there that covers Javascript Conflicts.
 * on_sent_ok is the generally the absolutely last thing that runs in CF7 so any
   interferring Javascript Conflict can stop this running.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Analytics code not working’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

## Tags

 * [submit](https://wordpress.org/support/topic-tag/submit/)
 * [trackevent](https://wordpress.org/support/topic-tag/trackevent/)

 * 4 replies
 * 2 participants
 * Last reply from: [Neil Murray](https://wordpress.org/support/users/buzztone/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/analytics-code-not-working/#post-5804194)
 * Status: not resolved