This objective is to capture the value of the UTM parameters that appear in the URL when a visitor arriving at a site from paid media.
Here is a sample URL which contains UTM parameters. Most used UTM parameters are utm_source, utm_medium, utm_campaign etc.
Sample URL Containing Parameters
UTM Parameter Breakdown
Steps to deploy your UTM Parameter Variable in GTM
- You will first need to create a user defined variable in GTM searching the query string of the URL for the specific UTM parameter to capture it. You should also include value format settings to set a catch-all value of "None" for when no UTM parameter is present.
- Next, you'll want to set a trigger event that fires on page loads but select the option for only firing on a condition where the variable you just created does not equal the catch-all value you set for when there is no UTM parameter in the URL. This will ensure that this snippet only fires when the UTM parameters are present. Please refer to the second screenshot to the right.
UTM Parameter Variable in GTM
- Once that's done, you can then include the names of the UTM variables in the Track function snippet to send back to Resonate. If you want to capture only one of these UTM parameters, then include that specific parameter in the code snippet and remove the other two.
UTM variables in Track Function Snippet
Please sign in to leave a comment.