UTM Parameters and URL Length

Highlighted
Level 2

UTM Parameters and URL Length

Does adding more/longer utm codes result in Marketo creating a longer url in emails (more characters in the mkt_tok)? I ask because we've noticed recently when hovering over some links in emails they seem to have very long urls that wrap for several lines. Not sure if this is due to adding more utm codes or something else.

7 REPLIES 7
Highlighted
Level 5

Re: UTM Parameters and URL Length

Utm's are set of 5 parameters:

1.utm_campaign

2. utm_medium

3. utm_source

4.utm_term

5.utm_content

There is no limit to the length of the utm's a URL. A URL that has fewer than 2000 characters will work with any combination of browser and web server. So even though there’s no limit on any individual UTM parameter, collectively, along with the destination URL, there’s a limit of about 2000 characters on the final URL.

-> It’s a good practice to keep the UTM parameters short and meaningful.

Highlighted
Level 10 - Community Moderator

Re: UTM Parameters and URL Length

Yes, but specifically the question is whether when Marketo rewrites a longer URL to bounce off the tracking domain, the tracked URL is made longer as a result.

Highlighted
Level 10 - Community Moderator

Re: UTM Parameters and URL Length

It’s a good practice to keep the UTM parameters short and meaningful.

See, I'm not sure I agree with this.

If something can be "short and meaningful" (meaning "short and meaningful to a human" presumably)... then sure.

But those two adjectives can be mutually exclusive. If you never have to have a human read your UTMs because they're generated and processed by code, they can be short, taking advantage of case-sensitivity as well. If you must keep them human-readable then they may necessarily have to be longer. It's much the same as naming variables in programming.

Highlighted
Level 5

Re: UTM Parameters and URL Length

Agreed, Sanford Whiteman​, I was taking into consideration the reporting purposes. Thanks for sharing this.

Highlighted

Re: UTM Parameters and URL Length

Sanford Whiteman​, I was just searching threads for a definitive answer on the following (below) subject and came across your response.

UTM codes & Case Sensitivity:

  1. Are you UTM codes differentiated by different case (e.g. 'displayad,' vs. 'DisplayAd')?
  2. If yes on question 1, do Marketo Smartlists/Triggers require an exact match on the various UTM parameters?
    • Basically, we have "too many cooks in the kitchen," which has resulted in a variety of UTM codes with mismatched case, but the same terms.

Grateful for your expertise.

Highlighted
Level 10 - Community Moderator

Re: UTM Parameters and URL Length

Marketo, no. But that's not the first entry point (nor final entry point if you're using a data warehouse/central analysis tool).

UTMs need to first be persisted on the browser side using JS, and JS is case-sensitive by default. Query strings per standard are case-sensitive, there's nothing that makes that part of a URI case-insensitive (unlike, for example, the "http:" -- or "hTtP:" -- protocol or the hostname, which are both defined as case-insensitive).

Webservers may also consider the query string (not to mention the file name) to be case-sensitive.

So UTMs will always be case-sensitive somewhere, thus should be assumed so everywhere.

On the flipside, they also will be compared case-insensitively somewhere in the ecosystem (like in flow filters) so you don't want to have values that differ only by case.

The solution is to have a central repo (could be Excel) where all your values are coordinated and recorded. That repo compares case-insensitively before letting you enter a new row. The values should be canonically added in lowercase.

Highlighted
Level 10 - Community Moderator

Re: UTM Parameters and URL Length

In short, no. The length of the tracking URL at your branding domain is not proportional to the length of the original target URL.