Skip to content

Tracking Contact Form Goal Conversion in WordPress

by Kevin on December 20, 2009

WordPress and Google Analytics

Contact Form 7 and Google Analytics Goal Conversion

If you’re running B2B lead generation site utilizing WordPress, you’ll want to have a look at this article:  Tracking WordPress Contacts in Google Analytics.


Previously, if you lacked significant programming knowledge, you might have found this task difficult.  However, using the Contact Form 7 plug in, a simple line can be added in the plug in settings using a WordPress hook called “on_sent_ok”.  The plug in developer explains it fully in the article.  Here’s an excerpt:

Using on_sent_ok action hook

You don’t need to edit any JavaScript files for running the above _trackPageview()function. Contact Form 7 provides a JavaScript action hook named on_sent_ok, and by utilizing this action, you can specify a JavaScript code that you wish to run after the form is successfully submitted.

It is quite a straightforward process for you to specify the aforementioned_trackPageview() with the on_sent_ok hook. You will find the Additional Settings field at the bottom of the contact form management page; now simply insert the following line into it:

on_sent_ok: "pageTracker._trackPageview('/mysite/thank-you.html');"

Set Up Google Analytics Goals and Goal Funnels

You’ll still need to set up a Goal and possibly a Goal Funnel in Google Analytics in order to track your success.  It’s critical to track these things though, so you know how well your page content and AdWords advertising is working for you.

Related posts:

  1. Great WordPress Web Analytics Plug In
  2. Effective Measurement of Clicks on An Affiliate Website
  3. Tracking the Marketing Source of Phone Customers
  4. Using Google Analytics and ZOHO CRM To Gain Small Business Insight
  5. Defining the Funnel of Failure in B2B Web Analytics
No comments yet

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS