admin

Track Contact Form 7 Submission in Google Analytics

05 July 2016

If you’re running Contact Form 7 on your WordPress website, you will definitely want to have conversion tracking that pushes an event to Google Analytics each time someone fills one of those forms out.Knowing where your leads come from is important.

Firstly, you need the basic Google Analytics script installed on your website. Otherwise this will not work.

Knowing where your leads come from is important, especially if you’re paying for website traffic – you want to know if the leads are coming from paid traffic, organic traffic, direct or referral websites.

Firstly, you need the basic Google Analytics script installed on your website. Otherwise this will not work.

installing contact form 7 tracking

Go into your Contact Forms.

select-contact-forms

Select the form that you want to apply tracking to. Once you’ve done that, click on the Additional Settings tab.

additional-settings-tab-on-contact-form-7

Now we are going to enter our tracking code that lets Contact Form 7 push an event to Google Analytics.

Copy and paste the below:

on_sent_ok: “ga(‘send’, ‘event’, ‘Contact Form’, ‘Submitted’);”

Then hit Save.

enter-tracking-code-on-contact-form-7

Setting up the Event in Google Analytics

We’ve told Contact Form 7 to talk, and now we need to make Google Analytics listen.

When you’re in your Google Analytics account, click on Admin.

click-admin-tab-in-analytics

Click on Goals on the far right side of your page.

Click Goals Tab in Analytics

Create a New Goal.

create-new-goal-in-analytics

Don’t get freaked out about which goal to set up, just click Custom.

create-custom-goal-in-analytics

Now let’s make this Goal an Event. You can call this Goal whatever you want, for simplicity we’ll call this one Contact Form Submission.

create-event-in-analytics

Now, this bit is important.

We have to make sure that what we’re telling Analytics to listen for matches what we told Contact Form 7 to push.

We’ve told Contact Form 7 to push: ga(‘send’, ‘event’, ‘Contact Form‘, ‘Submitted‘)

So we need to enter Contact Form in the Category box and Submitted into the Action box. Make sure there are no misspellings or extra spaces otherwise it won’t match up and register an event.

Once you’ve filled out those two boxes, click Save.

enter-event-values-in-analytics

Congratulations, you’ve just installed form tracking on Contact Form 7.

If you want to test out your tracking to make sure it works, go back into your Reporting section in Analytics and open up Real Time > Events. Whilst you have this page open, try and submit a contact form. If everything works, you should see an event registered within a few seconds.

Call 0424 646 001 Now