UTMs are being lost in redirects. Can this be fixed?
The custom code redirect is losing the UTMs so we can't attribute where the visit came from.
-
We can append the search parameters to the target url to make sure we don't lose any url parameters on redirect. Below is an example of the code where we add location.search to the target url:
This will add the entire search string (everything after the question mark) in the url to the target url. If you only want specific UTMs from the search string, you can separate those from location.search and only append them. Let me know if you have questions about this solution.
-
Hi Logan,
I don't think I was clear when I initially submitted my question. We are losing UTMs when we use the Dynamic Link feature. For example, we often test two variations of a page against each other with a signle paid ad and lose the Paid Social UTM. Is there an easy solution to keep these UTMs after we redirect the traffic?
Also, what does selecting this box mean for a Dynamic Link Experience?
" ☐ Add UTM parameters to destination URL"
Thanks!
-
Hi Alia,
Unfortunately there is not a good solution for this when utilizing Dynamic Links. The option for "Add UTM parameters to destination URL" adds the following tracking parameters to all of the destination URL’s:
- utm_campaign: The Dynamic Link name
- utm_medium: The string “Smart Link”
- utm_source: The referring domain of the Dynamic Link
The utm_source however is just the domain and will not include the query string.
Please sign in to leave a comment.
Comments
3 comments