Menu

UTM codes on Flywheel

Updated on February 21st, 2023

When trying to grow your online business, it can often be helpful to have data outlining how exactly visitors are reaching a page on your site. Understanding where visitors come from can help determine whether your Facebook advertising campaign is actually driving customers to your site, or how many clicks your latest email marketing blast has generated.

Enter UTM codes. In this article we’ll discuss what they are, how they can affect site performance, and what Flywheel does to ensure your pages remain speedy when they are used.


What is a UTM code?

This data can be gathered through the use of Urchin Tracking Module Codes (or “UTM” for short). The name derives from Urchin Tracker, the precursor to Google Analytics. These codes are added to the end of a URL to track the performance of digital marketing efforts. If you have ever clicked a link in an email prompting you to check out a “new sale” or to “sign up for an account”, this interaction was likely tracked via UTM codes.


What do UTM codes look like?

UTM codes are implemented via variables that are added to the end of URLs. Here is a basic example:

getflywheel.com/?utm_campaign=email

The UTM code is formatted as a query string, so it will begin with a “?”. Multiple UTM codes can be strung together with the “&” symbol. For example:

getflywheel.com/?utm_campaign=blackfridaysale&utm_medium=social&utm_source=facebook


How can UTM codes impact my site performance?

Since UTM codes modify a page’s URL, this could potentially result in a “cache miss”, forcing the page to render uniquely. This uses up server resources, and results in a slower page load, even if the base URL is cached. Due to their usage frequency and standard formatting, Flywheel automatically accommodates for this list of UTM prefixes on our Cloud platform to retain the benefits of caching. This is commonly referred to as “UTM Sanitization”:

  • utm_* (Generic)
  • glid (Google)
  • gclid_ (Google)
  • fbclid_ (Facebook)
  • mc_cid (Mailchimp)
  • mc_eid (Mailchimp)
  • hsa_* (Hubspot)
  • _hsenc (Hubspot)
  • _hsmi (Hubspot)
  • msclkid (Microsoft)

This means pages using the UTM prefixes above will still be cached! Luckily, since Google Analytics processes these tracking codes via javascript on the front-end, it will not be prevented from tracking these UTM codes. Nice!


Should I use UTM codes to serve unique content?

Beyond tracking, UTM codes could also be used to pass additional variables to the site to provide unique content to visitors. This is sometimes configured by passing the UTM codes to be parsed by the PHP layer, which necessitates a cache bypass.

In other words, if your site needs to pass UTM parameters to PHP in order to serve unique content, your site will be unable to cache. This will result in degraded site performance, so we recommend against the use of PHP to handle UTM parameters for any reason. Instead, we recommend only handling UTM parameters at the Javascript level, which can still be served from the caching layer.


Need help?

If you have any questions our Happiness Engineers are here to help!

Was this article helpful?

Getting Started

New to Flywheel? Start here, we've got all the information you'll need to get started and launch your first site!

View all

Account Management

Learn all about managing your Flywheel user account, Teams and integrations.

View all

Billing

Everything about billing, invoices and payments can be found here.

View all

Features

Flywheel hosting plans include a ton of great features. Learn about how to get a free SSL certificate, set up a staging site, and more!

View all

Platform Info

All the server and setting info you'll need to help you get the most out of your Flywheel hosting plan!

View all

Site Management

Tips and tricks for managing your sites on Flywheel, including going live, troubleshooting issues and migrating or cloning sites.

View all

Developer Hub

Learn how to connect, deploy, and more with SSH on Flywheel's platform.

View all

Growth Suite

Learn more about Growth Suite, our all-in-one solution for freelancers and agencies to grow more quickly and predictably.

View all

Managed Plugin Updates

Learn more about Managed Plugin Updates, and how you can keep your sites up to date, and extra safe.

View all

 

Flywheel help

Help is just a click away! Log into Flywheel dashboard to instantly chat with an expert, respond to a ticket, or follow along with in-depth documentation. We happily offer support 24 hours a day, 7 days a week, 365 days a year!

Log in

Try Flywheel today

Launch your next site on WordPress in minutes.

 Free migrations  24/7/365 support  14 day demo sites