UTMs are being lost in redirects. Can this be fixed?

Comments

3 comments

  • Logan Mcbride

    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. 

    Comment actions Permalink
  • Alia aliasobrepena

    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!

    Comment actions Permalink
  • Logan Mcbride

    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. 

    Comment actions Permalink

Please sign in to leave a comment.