Tracking Contact Form Goal Conversion in WordPress

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.

About kevin

I work as an internet marketing manager in domestic (US) manufacturing, and blog about B2B web lead generation, CRMs, web analytics, and a little bit about affiliate marketing. I also am an avid Kayak Fisherman.