Tracking when people submit forms on your website

Increase sales. Know where your customers are coming from.

July 1, 2018

When you run a business it is important to know what is happening, and what you can do to drive growth. For instance, if you are getting a lot of phone calls, you want to know how those phone calls are being generated so that you can optimize your marketing to continue to get those calls. And if you have a form that allows visitors to submit their information, you definitely want to know where they are coming from, and you want to track those forms in order to optimize your marketing further.

Reporting of this type is absolutely important to you as a client or else you are blind as to what is going on. For instance, I provide my clients with a monthly report that details various facets of their marketing from SEO and PPC performance, Facebook campaigns, to call tracking, and lead generation metrics.

As a client, you need to understand these metrics, understand these terminologies, so that you can have a better perspective of your business and future growth.

As a consultant, it is important to me that my client understand exactly what all these mean or else it does not lend itself to a mutually constructive relationship. And in a situation where a business owner is trusting a consultant, it is imperative that the communication is clear and constructive.

Exactly what do I mean by a constructive relationship? It is a relationship that serves a useful purpose. Meaning that if the client does not understand the metrics of the marketing I'm providing them, then the client is not going to be able to participate with their input.

Configuring Contact form 7 tracking with Google Analytics

What I want to talk about today is configuring your contact forms so that you can track it when people submit their information on your website. Using Google Analytics we can track the forms that we have on our website, thereby understanding what page a lead landed on before submitting their information, what led them to submit their information, and how long they stayed on our website.

Now I work with WordPress most of the time, and this demonstration is going to be using the contact form 7 plugin, in addition to Google Analytics. And the key thing that we're doing is configuring Contact form 7 plugin with Google analytics so that we can see every form submittal event that happens on Google Analytics.

Before we proceed with this, I'm assuming that you already know what WordPress is, you already know the importance of having contact forms on your website, and I'm also assuming that you already have configured Google analytics on your website. If not this may be a bit advanced and it may be advisable to contact a professional website developer (fortunately I am one) to assist you.

As you can see I already have several forms on my website and this form tracking configuration will track all forms on your website whether you have 1 or a 100. If you need the instructions for what we’re doing, visit the page on contact form 7 that explains it here.

contact form tracking

Every contact form submission that takes place on your website is an event, and we can use Google Analytics to track these events. So that is the key here, we are tracking the contact form submission events.

In order to track contact form 7 events, we are going to include this code in the header portion of our WordPress website:



document.addEventListener( 'wpcf7mailsent', function( event ) {

    ga('send', 'event', 'Contact Form', 'submit');

}, false );



This code tells Analytics to track successful form submissions and to track them as an event. The next step in this process is to place this code in the header portion (<head></head>) of each page of your website. And in this case, I am using header insertion plugin to locate the code exactly where I want it on my website.

Once that is done, then we are going into Google analytics to configure the events settings so that it will ‘listen’ for the events that have set for.

Within Google analytics, we will configure a goal. And here's a good way to look at it. Every event submission is a lead and that is our objective or goal so in configuring a goal in Google analytics we then specify that the type of goal is the event.

With a goal configured correctly, Google analytics will then track the successful form submissions on your website as an event. As you can see from my picture above, set “contact form” as the event category and “submit” as the event action.

After you configure this you can verify the tracking of forms by going to Behavior > Events > Overview report within your Google Analytics. Although give it a day or two after a form submission, at that point you'll find that your forms are tracking, and you'll actually be able to see the activity within your reports.

If you have any questions about configuring tracking for your forms on your WordPress website, feel free to leave a comment and I will do my best to help or drop me a line on my contact page.

I got the idea to write this because while working with clients You realize how important it is to help a client understand exactly what is happening, and where their marketing dollars are being spent.

For instance, if a client is paying me $x,xxx a month for various marketing efforts, I want to help them understand exactly where those leads are coming from, and why they're coming. Because once the client understands this they can actually start to provide valuable input into the whole marketing set up. Additionally, it helps them to really value the process and understand how their business is functioning from a marketing standpoint.

Subscribe to my informative posts via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 4,960 other subscribers


Leave a Reply & let me know your thoughts.

%d bloggers like this: