Set up Universal Google Analytics goal for Contact Form 7

Set up Universal Google Analytics goal for Contact Form 7
02/10/2017 Wyze

Setting up Universal Google Analytics goal for Contact Form 7 WordPress plug-in

When we first created the landing page of our eCommerce consulting business on WordPress, we had to use a Contact Form 7 plug-in. Although Contact Form 7 is a very popular solution, it is not user-friendly and hence its integration with Google Analytics to measure conversion rates is a little bit tricky.
After some research, we have compiled a guide to let you know how to do it.

If you want to know how to set up event tracking, the second guide that is mentioned above may prove to be a better start. If you are looking to set-up goal and also track conversions you have to perform some extra steps. In the remaining part of this article we will explain the entire process of setting up Universal Google Analytics for Contact form 7 WordPress plug-in.

  1. Create your Contact Form 7

Start off by following the usual process of setting up contact form for your WordPress website using Contact Form 7 plug-in and if you need help with that you can go through the official documentation which is considerably comprehensive.

  1. Tracking code

You can find a section known as Additional setting at the bottom of the new form creation screen

Universal Google Analytics goal

You will have to insert a piece of code in this box that will send a notification to Google Analytic after the form is successfully submitted.

The code should look like:

on_sent_ok: “ga(‘send’, ‘event’, ‘Form’,’sent’, ‘ Service Request’, 100);”

  • Do not change ‘send’ and ‘event’, they have to stay the same;
  • Formis Category name
  • Sentis Action
  • ServiceRequest is Label
  • 100 is value (should be number)

For a more detailed and in depth description about the parameters you can visit Google Analytics help.


  1. Setting up goal in Google Analytics

After you log-in into your Google Analytics account, go to admin and select your account, go to property, view and click Goals


Contact Form 7

At the top of the list for your existing goals, click the New Goal button and choose an appropriate template. We have chosen and used Revenue/Place and order as our landing page form was a request for service, after that click Next button

Click/select Event as a type of goal is step 2. Your own name can also be defined here for the goal, afterwards press Next step button.

Contact Form 7

We need to define the event parameters at the final stage.

Contact Form 7

You need to use the parameters that you have defined at step 2 when you customized the code. we will use the data from our example:

  • Formto category field
  • Sentto action field
  • ServiceRequest to label
  • 100to value

All you need to do now is click on the create goal button and your goal will be created.

Important note

You need to make sure and keep in mind that without the code the form will not work properly, thus the page where you have set the form with the code must have a Universal Google Analytic tracking. In case of failure, your submissions will not be tracked and your users will not be able to see the success or thank you message after they have submitted the form

You can use the View Page Source function in your browser to check it if you are not sure it exists. You can check what it should look like by looking at the screenshot below(with your individual number after UA).

Contact Form 7

You will be able to find your code in Admin/Property/Tracking Info section of your Google Analytics

Comments (0)

Leave a reply

Your email address will not be published. Required fields are marked *