Last Updated: May 16, 2019.
Current Version: 1.0.3
UTM Tracker is a FREE WordPress plugin to track the source of conversions. UTM parameters are inserted automatically into your website forms.
What Does It Do?
UTM parameters (Urchin Tracking Module) are a useful way to track the source of traffic when using tools like Google Analytics. Wouldn’t it be great if you could also track this info when a visitor signs up with a web form or places an order? Well, now you can!
When passing UTM parameters, GCLID, and other predefined parameters to your website it stores this info via a website cookie for 30 days. It can then be inserted into any lead generation or order form on your website. It automatically adds this extra information as hidden fields in your HTML form.
This is a fork of script utm_form, and made into a WordPress Plugin. The script has been modified to already include the additional variables ‘gclid’, ‘adpos’, ‘net’ and ‘match’ to measure conversions with ad networks like Google, Bing and Facebook.
Why Do I Need It?
Google created the UTM parameters standard to help track referrals so you know the exact source of your website traffic. Using website referrals are unreliable at best. In many cases, the referral is blocked or not available. One example is a link in a smartphone app which in most cases come up as an unknown traffic source.
If you want to know the source of every order or email subscriber, use this plugin.
You create a Facebook ad, add UTM parameters and send them to your home page.
The visitor Bob clicks on your Facebook ad and lands on your home page. He then proceeds to visit a few other pages. He eventually visits your mailing list form at https://www.yoursite.com/subscribe/ and submits his email address firstname.lastname@example.org to your MailChimp mailing list.
From the information stored in MailChimp you’ll know that Bob came from a paid Facebook ad with the campaign “myad” and was the second version of your ad.
So you can attribute the source of traffic or conversions and know how effective your ad campaigns have been.
Not all traffic is created equal. Once you have this information your use with it can be limitless. You can measure which source of traffic is better performing. It can be used to fire off different events in your mailing list.
The plugin supports the standard UTM parameters with also some newer parameters to help track ads as well.
- utm_source (required) – The platform (or vendor) where the traffic originates, like Facebook or your email newsletter.
- utm_medium (required) – You can use this to identify the medium like Cost Per Click (CPC), social media, affiliate or QR code.
- utm_campaign (required) – This is just to identify your campaign. Like your website or a specific product promotion.
- utm_content – If you’re A/B testing ads, then this is a useful metric that passes details about your ad. You can also use it to differentiate links that point to the same URL.
- utm_term – You’ll use this mainly for tracking your keywords during a paid Google Ads campaign. You can also use it in your display ad campaigns to identify aspects of your audience.
- gclid – Google creates a unique id that is passed when a visitor comes from a clicked ad.
- adpos – The position of the Google ad on the page.
- place – The content site where your ad was clicked (for keyword-targeted campaigns), or the matching placement targeting criteria for the site where your ad was clicked (for placement-targeted campaigns).
- net – The network source of the traffic from Google.
- match – The keyword matching from the ad displayed on Google.
How Do I Use It?
- Install and activate the WordPress plugin on your website. This can be done with the “Plugins” section by selecting “Add New”. Then search for “UTM Tracker”.
- You need to make your forms accept the new fields. Based on the information available for a visitor, the fields added to your form can be any of the following:
- USOURCE – Value of ‘utm_source’ parameter if present.
- UMEDIUM – Value of ‘utm_medium’ parameter if present.
- UCAMPAIGN – Value of ‘utm_campaign’ parameter if present.
- UCONTENT – Value of ‘utm_content’ parameter if present.
- UTERM – Value of ‘utm_term’ parameter if present.
- IGCLID – Value of the ‘gclid’ parameter if present.
- IADPOS – Value of the ‘adpos’ parameter if present.
- IPLACE – Value of the ‘place’ parameter if present.
- INET – Value of the ‘net’ parameter if present.
- IMATCH – Value of the ‘match’ parameter if present.
- IREFERRER – URL of the initial referrer.
- LREFERRER – URL of the last referrer.
- VISITS – Number of visits.
- Setup any links to your website with the parameters listed above.
What Will My Form Look Like?
Let’s say your lead generation form looks like this before the plugin is added.
<form action="//terminusapp.us6.list-manage.com/subscribe/" method="post"> <label for="mce-email">Email Address</label> <input type="email" value="" name="email" id="mce-email"> <input type="submit" value="Subscribe" name="subscribe"> </form>
Once the plugin is added, your form will look like this after the page is loaded.
<form action="//terminusapp.us6.list-manage.com/subscribe/" method="post"> <label for="mce-email">Email Address</label> <input type="email" value="" name="email" id="mce-email"> <input type="submit" value="Subscribe" name="subscribe"> <input type="hidden" name="USOURCE" value="facebook"> <input type="hidden" name="UMEDIUM" value="cpc"> <input type="hidden" name="UCAMPAIGN" value="myad"> <input type="hidden" name="UCONTENT" value="version2"> </form>
The additional hidden fields are added automatically to the HTML form. No additional coding is needed.
When someone submits the form, all the extra information is also sent along with the email address.
In order to store this information, you’ll need to make sure that your form can accept these values. If it is a MailChimp form, configure it to accept these fields. Same for Active Campaign, CampaignMonitor, AWeber or any other service. Any HTML form on your website can capture this information.
It needs to match the field name exactly above, or the information won’t be captured by your system.
Frequently Asked Questions
What happens if someone visits a bunch of pages on my website/blog before filling the form?
It doesn’t matter. As soon as they land on your website, the script saves the information in a cookie. This cookie is valid for 30 days. It adds this information automatically to your form from the saved cookie.
Where can I find more about UTM parameters and how to properly use them?
I recommend reading this tutorial on using UTM parameters, standardizing the naming and tracking them.
How can I track Google Ads parameters?
By default, Google just passes GCLID variable but you may want more information. Here’s my global configuration setting for my tracking template. Adjust how you see fit. So all ads created will pass this information.
- fixed bug where documentation and code did not match variables passed.
- Added latest version utm_form 1.0.4
- Added options for the domain name (default TLD defined in WordPress setup) and TTL of cookie (default 30 days)
- First version released to the WordPress community.