This article is for someone that has a basic understanding of WPForms and campaign URLs and wants to better track their form submissions from various sources. Updated on January 31, 2022.

WordPress is a versatile and easy to use CMS, powering over 43% of the world’s websites. And there’s good reason for that! It’s free, has tons of themes, plugins and support for it and overall relatively easy to use. We use it for clients who are looking to have a theme customized because of how versatile it is.
In this article, we will focus on a specific plugin and use case of the plugin and how it can help you track where your leads are coming from more precisely… WPForms.
We’ll answer these three questions. For those of you that are familiar with the first two, feel free to skip down to the meat and potatoes with the last question. In a future article, I will go over how to setup tracking templates in Google Ads to automatically send over campaign URLs from your ads and with this setup in place, you’ll be ready to automatically capture that data.
- What is WPForms?
- What are Google Campaign URLs?
- How do I capture Google Campaign URLs in WPForms?
What is WPForms?
WPForms is a responsive, drag and drop form builder for WordPress. It’s packed with various features such as conditional logic, templates, payments and so much more.
We use the WPForms Pro version which has increased functionality but allows us to offer a service to clients that require lead capture on their website. Some of the features I talk about in this article may not be possible without at least the pro version of the plugin.
I’m not going to go over how to create a form in this article, there are plenty of resources for that. This article assumes some basic knowledge of WPForms is already present and we’ll be talking about the techniques to capture the Google campaign URLs in a moment.
What Are Google Campaign URLs?
Google Campaign URLs are parameters attached to the end of your URL that will track custom campaigns in analytics to help you better understand how links from certain places perform.
By adding campaign parameters to the destination URLs you use in your ad campaigns, you can collect information about the overall efficacy of those campaigns, and also understand where the campaigns are more effective.
Those URLs from the link above can look scary but there’s actually a URL builder tool that can make it a little easier to build those campaign URLs. This is great if you want to build manual URLs for a variety of purposes:
- Third party links
- Landing page redirects
- Facebook Ads
- Google Ads
Campaign URLs require a few variables:
- Your URL obviously
- Campaign Name
- Campaign Source
- Campaign Medium
The link to the builder helps explain how you would use each of these. It’s your data so use values that make sense to you.
With Google Ads there’s a better way to do this than building out manual links each time with something called a tracking template inside your ads account but that topic warrants a separate article entirely to walk you through that process.
For this one, we’ll just focus on how to capture it so no matter where you decide to use these campaign URLs your form will be ready to capture the data.
How do I capture Google Campaign URLs in WPForms?
For this example, we’ve already got a form setup that we’re going to just add some fields to so we can begin seeing this data in the entries view on WPForms.

In all these examples, these fields are hidden and never shown to the user or customer. Some of our clients have the same form on multiple pages so we track the Page URL as well to know where people are filling out the form. We use the smart tag for this {page_url}.

The campaign fields are a bit trickier but use a similar concept as the Page URL smart tag. They use the {query_var key=””} smart tag.
The key=”” in this smart tag is telling the form to look for the parameter that is passed in the URL that has the name utm_campaign and the value that is behind that in the URL will be stored in your form data.
It is rinse and repeat for all the campaign URL fields that you see when you generate a URL. Since the campaign URL requires at least the name, source and medium, you’ll likely want to capture those at a minimum.
In my picture above you can see I’m tracking much more than just those three as I have that tracking template in Google Ads we talked about. That will be a separate post to walk you through that but there’s a bunch of good tutorial videos on how to automate your tracking URLs in Google ads already.
WPForms and Google Campaign URLs
For a lot of websites and clients, it’s important to know where your leads or customers are coming from and tracking Google campaign URLs in WPForms gives us the insight to make better decisions as a business owner and for our clients who want to know where to spend more money.
You could take this a step further and pass this data directly into whatever CRM or system the leads are going into as well if you want to make reporting directly from the CRM a breeze.
Hope this information helps and happy to assist if anyone has any questions!
- Written by: Gator SEM
- Posted on: September 15, 2020
- Tags: Google Campaign URLs, Hidden Fields, WPForms