blog-tracking-user-behaviour

Track Contact Form 7 Conversions via Google Analytics in 2 Minutes

Contact Form 7 has been the favoured free plugin in the WordPress Community for a long time. It’s easy to use, doesn’t cost a cent and also comes standard with most themes these days.

Despite this tracking conversion through Google Analytics has never been as straightforward, this form does not allow you to link to “Thank You” pages so a clean conversion is not trackable the through this traditional, favoured method.

Fixing This In The Past

Conversion tracking in Analytics was easily fixed by adding a quick event to the Additional Settings tab of the desired form. However, this method was made obsolete at the end of 2017. If you running very old versions of contact form on your site, this may still work.

However, if you running the newer versions of the form, you’ll notice adding your event code to the Additional Settings Tab, yields an error and no goals or events are fired in analytics.

Luckily I figured out a quick and easy way to fix this issue.

The official fix

If you looking for the official fix from Contact Form 7 itself, please visit their site and refer to their documentation.

It seems simple and I followed it to the T, along with other methods that suggested editing the functions.php file and it didn’t work. But if you looking for a solution that actually works, try the fix below.

The fix that actually works

With this method, tracking conversions with Google Analytics and Contact Form 7 is really simple. And it honestly doesn’t take more than two minutes of your time (if Google Analytics is already implemented on your site).

  1. Make sure Google Analytics is Implemented
  2. Have a quick look at the HTML source of a webpage on your site to make sure Google Analytics is implemented, You should have a code similar to this in the < head > section of the site.

    <!-- Google Analytics -->
    <script>
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
     
    ga('create', 'UA-XXXXX-Y', 'auto');
    ga('send', 'pageview');
    </script>
    <!-- End Google Analytics -->

    If you don’t have analytics setup already, consult Google’s documentation on how to do just that.

  3. Install theContact Form 7 Google Analytics Plugin
  4. Events are setup, now all you have to do is setup the goal/s.

  5. Fire off Event and Make a note of the elements
    • In Analytics, browse to the events report under Real-Time
    • Complete the contact form onsite and click submit.
    • Make a note of the Event:
      Category,
      Action and
      Label

  6. Create a goal in Analytics
    • Select Admin in the Analytics side panel.
    • In the third coloum, under View, select Goals.
    • Select the Red, + NEW GOAL button
    • Under Goal Setup, select Custom (last option) and click continue.
    • Name your Goal Under Goal Description, e.g. Form Submission
    • Select “Event” under “Type” and click continue.
    • Now you need the notes you made earlier, in step 3 regarding the evnt conditions, Fill in the Event Category,
      Action and Label.
      Note: Label Is not necessary but if you have more than one form and would like to distinguish between each in seperate goals then please add.
    • Click The “Save” Button, and you done!

    You can create a separate goal for each different form if you like and can easily track their performance separately. All you have to do is add the different labels for each form

CONTACT US

If you would like to know more about Tracking Conversion in Analytics, comment below or contact us here

About the author

Shamima Ahmed

View all posts

15 Comments

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.