(updated March, 2023)
What is a UTM?
The UTM code is the key to tracking your digital marketing campaign's performance. This simple little module can be attached seamlessly on any URL, generating Google Analytics data for all online platforms - including Facebook or Twitter ads! If this is done right you can track campaign success all the way to the bottom funnel/ closed wins. UTM's are very important to determine campaign ROI. So if you are not tracking campaign success with UTM's you should be! True ROI, very important.
What are UTMs check out this article here.
How do UTM's Work?
UTM's are a link that you would build that you then use in your campaigns. it would look something like this:
Now onto an example:
We are running a custom piece of code in the head of the project in Webflow to grab the UTM's. We want the UTM's to persist past the first page so we will use local storage in the browser to save them for later use. Here is an example of the code I am using to do this. update: When I wrote this original post, I was intending to use this code on one page. The problem is if we dont check to see if the UTMs are stored when we run the getUTM function it will just overwrite the code. We need to look into localstorage for the UTMs and then if they are present do nothing. If they are not present them we will try and extract them again.
Now that this code is running we will see the green arrow above, the UTMs will be stored in the "params" value in your local storage. We can then retrieve them from there and place them into our contact form in hidden fields to use for bottom funnel campaign measurements. We run this on a document.ready because we want to ensure that if we are using something like a Marketo form it is fully loaded before we attempt to insert the utms.
Now you just have to match the inputs on your form with the inputs that this code would feed the UTM's to. We use turnery operators to place the UTM's if they are present or to do nothing. We don't want this to error out which is why we use them as well if the UTM codes are not present. As always if you need help setting up tracking or implementing bottom of funnel UTM's measurements feel free to reach out. We are always here to help! If I can improve this article, send me an email at sgowing at socialcatnip.com or let me know!
If you are looking to pass UTMs to a app from a marketing website check out this solution here.
Reach out to us today. We are always working to improve our services so you can stay on top of your digital marketing goals. Simply fill out our online form to get jump-start your digital marketing today!