Contact Form 7 UTM tracking

By Haktan Suren, PhD
In Blog
Jun 23rd, 2018
15 Comments
62466 Views

Want to track UTMs and more on your Contact Form 7 plugin in WordPress? You are at the right place… If not, please check Handl UTM Grabber Integrations page for other plugin (e.g. Gravity Form, Ninja Form and more) integrations.

Why/How should I use HandL UTM Grabber / Tracker with Contact Form 7

Contact Form 7 is one of the most downloaded plugin on WordPress if not the most. Many WordPress users prefer CF7 because it is very easy to use and compatible with various of plugins and themes.

As a business/website owner, it’s always good idea to know more about your clients to better strategize your marketing goals. That’s where UTM code comes handy.

UTM is a simple code that you can attach to your URLs in order to track a source, medium, campaign and more. This enables Google Analytics to inform you how your visitors find your website and what your prospect is interested in. Of course, Google Analytics only provides this information at very generic (e.g. per URL, data range etc.) level.

As a business owner, your goal is knowing more about your CLIENTS rather than other metrics. That’s why combining UTM codes with user data is very crucial in marketing. And this is exactly how HandL UTM Grabber helps you to accomplish.

OK… That’s enough chit chat, let me know talk about how you can integrate HandL UTM Grabber with Contact Form 7 and attach those UTM data (and more) with your clients (prospects) and eventually pass it to your favorite CRM (Customer relationship management).

What you need to get started?

First of all, in order to get started, you need couple things:

If you are not familiar with HandL UTM Grabber, or want to learn more about what you can capture, please visit this page.

So… you downloaded both Contact Form 7 and HandL UTM Grabber plugin? OK, Let’s move on then…

First we are adding the shortcodes in the form as it is shown below.

Example Code Snippets


[[utm_campaign_i]]<input type="hidden" name="utm_campaign" value="%s" />[[/utm_campaign_i]]

[[utm_source_i]]<input type="hidden" name="utm_source" value="%s" />[[/utm_source_i]]

[[utm_medium_i]]<input type="hidden" name="utm_medium" value="%s" />[[/utm_medium_i]]

[[[[utm_term_i]]<input type="hidden" name="utm_term" value="%s" />[[/utm_term_i]]]]

[[utm_content_i]]<input type="hidden" name="utm_content" value="%s" />[[/utm_content_i]]

[[gclid_i]]<input type="hidden" name="gclid" value="%s" />[[/gclid_i]]

Here is what it looks like:
Contact form 7 UTM tracking: UTM Fields in form

And then, to include the new inputs in the email

Campaign Name:
[[utm_campaign]]

Campaign Source:
[[utm_source]]

Campaign Medium:
[[utm_medium]]

Campaign Term:
[[utm_term]]

Campaign Content:
[[utm_content]]

Gclid:
[[gclid]]

Here is what it looks like:
CF7 - UTM Fields in mail

Done!

Are you with me so far? If you followed the directions correctly, you should be ready to roll.

If not, I’ve a video version of this tutorial (you are lucky!). Check it out here:

Feel free to drop me a line in the comment section below if you have question about Contact Form 7 and HandL UTM Grabber. I am usually prompt answering, jut try ?

About the Author

Haktan Suren, PhD
- Webguru, Programmer, Web developer, and Father :)

15 Responses to “Contact Form 7 UTM tracking”

  1. Craig says:

    Hi, thanks for this great resource. How easy would it be to pass these values through an API JSon Post Method?

    We use a CRM system called Hubsolv and require to retain these values in a their system a. for sales/customer rapport building b. More important to me – so we can drill down and show that it’s not just about cheap leads, it’s about showing how well the data converts – build our decisions around ROAS than CPL!

    I’ve been able to employ a freelancer to push the form fields of first name, last name, telephone and email address – but he doesn’t understand what I mean when I talk about utm values.

    It’s probably the way I’m explaining to him!

  2. Kent says:

    Hello!

    Is there any way to utilize the UTM field to track organic traffic? For example, if a customer types in our URL and it doesn’t have a UTM in the querystring/URL, the source will come back as a certain value?

  3. Mohan says:

    How do we print these in thank you page url as parameters.

    https://test.com/thank-you-subscribing/?utm_source=%5Butm_source%5D&utm_medium=%5Butm_medium%5D&utm_campaign=%5BButm_campaign%5D Syntax didn’t work.

    Using Contact Form 7 Redirection plugin to send users to thank you page.

    So was asking if any tips or how to on this one.

  4. yaacov says:

    Is it possible to turn those parameters to contact form 7 legit fields so i will able to use them to send info to CRM as Hubspot?
    because if they are shown in the email but not defined as contact form custom fields i can’t send them easily to CRM.

  5. thomas seguin says:

    Hey,

    Was wondering how to capture the URL Referrer in CF7. I have been successful at capturing UTM parameters set by a tracking template on Google Ads but can’t manage to use the shortcode for the referrer in CF7.

    Where should I input the codes in CF7?

    Thanks

    Thomas

    • Haktan Suren, PhD Haktan Suren says:

      Tried the [handl_original_ref] shortcode?

      • thomas seguin says:

        Yes I did. Placed the [handl_original_ref] in the input section but I don’t know what to put in the body of the email.
        The shortcodes used for the utm input are different, I tried to replicate the procedure but wasn’t successful.

  6. sebastian says:

    Hi! nice job!!
    It is possible ad this utm to a google sheets?
    Campaign Source:
    [utm_source]
    and
    Campaign Medium:
    [utm_medium]

    Thanks!

  7. […] Based on the several feedback I received from the people using HandL UTM Grabber. Contact Form 7 is one of the major WordPress form plugins used to collect leads. Hence, In previous blog post, I explained how to capture UTMs from your Contact Form 7. […]

  8. Daniel Yordanov says:

    Hi,
    I use your plugin. It works well and is very useful. I also use it and outside of Contact Form 7, but after version (2.6.3) it no longer works . So I went back to this version. I test the new versions from time to time, but the problem remains with me and I am forced to stay on version (2.6.3).
    Maybe it needs some my syntax change already.
    Here is part of this code where it is embedded.

    $html .=”UTM Campaign:”.do_shortcode(‘[utm_campaign]‘).””;

    This still works perfectly, but if I switch to a higher version of the plugin, instead the result, itself name of appears the shortcode.
    But it continues to work well in Contact Form 7.
    The results is the same regardless of the version of WP

    Thanks.

Wrap your code in <code class="{language}"></code> tags to embed!

Leave a Reply

E-mail address is required for commenting. However, it won't be visible to other users.

Loading Facebook Comments ...
Loading Disqus Comments ...