Tracking Contact Form 7 events with Yoast and Google Analytics

David Nash wordpress 1 Comment

I discovered this while setting up Google Analytics when I recently re-launched my site. I’m using the very popular WordPress plugin Contact Form 7 for a nice AJAX contact form. I’m also using the equally popular Google Analytics by Yoast (GAbY) WordPress plugin. Google Analytics shows which pages users are viewing. I want to drive users to contact me, and I’d like to get information on how many people are doing that. But because it’s an AJAX form (ie, submits the data via Javascript), Google Analytics doesn’t register an additional page view. You have to “tell” it to do that. At first I …