The campaign link has spaces in it

A space isn't allowed in a web address, so campaign links with spaces get cut short or encoded oddly. Replace spaces in UTM values with - or _ and recheck.

SymptomThe link only works up to a point, shows %20 in reports, or a UTM value arrives cut short.
Likely causeA UTM value or page address was typed with a space, such as utm_campaign=diwali sale.
FixReplace spaces in UTM values with - or _, and encode any other space as %20.

Short answer: A space isn't a valid character in a web address. When a link contains one, the app or tool showing it has to guess what you meant: some encode it as %20, some stop the link at the space. In UTM values, replace spaces with - or _ so the value stays the same everywhere.

What does a space do to a link?

Space in a link: a blank character inside a web address, which the link standard does not allow and which must be written as %20 to be part of the address.

Percent-encoding: the way a link writes characters it can't contain directly, as % followed by two hex digits. A space becomes %20, = becomes %3D and & becomes %26.

The standard for web addresses, RFC 3986, has no place for a raw space. So a link with a space in it is, strictly, two pieces of text side by side.

Why do spaces break campaign tracking?

Because different tools handle the gap differently. A link with a space may be shortened at the space, encoded as %20, or encoded some other way by a form or spreadsheet, so one campaign name can arrive in several versions.

  • Cut short: a chat app or email client may make only the first part clickable, so utm_campaign=diwali sale arrives as diwali.
  • Encoded differently: reports may show diwali%20sale from one tool and something else from another.
  • Split rows: each version counts as a separate campaign, because reports store UTM values exactly as they arrive. See inconsistent UTM naming.

Example

A link with spaces in the campaign and content values:

https://example.com/sale?utm_source=instagram&utm_medium=paid_social&utm_campaign=diwali sale&utm_content=reel 01

The fixed link, with underscores instead:

https://example.com/sale?utm_source=instagram&utm_medium=paid_social&utm_campaign=diwali_sale&utm_content=reel_01

If a space is part of the page address itself, such as a file name, encode it as %20 rather than renaming the value.

How to fix it

  1. Paste the link into the link checker. It warns when a link contains spaces and shows which tag they are in.
  2. In UTM values, replace each space with _ or -. Use the same separator in every link.
  3. In the page address, encode spaces as %20, or better, ask for a page address without spaces.
  4. Build new links in the UTM builder with "make values lowercase and replace spaces" ticked. It does this for you.
  5. Watch for spaces at the very start or end of a value. They're invisible when you copy and paste, but they still count.
  6. Check the final link again after pasting it into the ad or email tool, in case the tool changed it.
FAQ

Common questions

Should I use %20 or an underscore in UTM values?

Use an underscore or hyphen. `%20` is correct encoding, but it's harder to read in reports and easy to mix with unencoded versions of the same name.

Why does my campaign name show %20 in Google Analytics?

The value was sent with a space, and the space was encoded as `%20` somewhere along the way. Rename the value without spaces in future links, since old data keeps the name it arrived with.

Is there a maximum length for a link?

There's no single hard limit. The HTTP standard recommends that systems support addresses of at least 8,000 characters, but some apps cut much shorter links, so keep values short anyway.

Do spaces matter in App Store and Play Store links?

Yes. On Google Play the whole referrer value must be URL-encoded, and Apple doesn't allow a space at the start or end of a campaign token. See [Play Store referrer encoding](/problems/play-store-referrer-encoding/).

What are UTM parameters?

UTM parameters are tags added to the end of a link, such as utm_source and utm_campaign, that tell analytics tools where a visit came from. They let you see which campaign, channel and ad brought each visitor.

Which UTM parameters are required?

Use utm_source, utm_medium and utm_campaign on every campaign link. utm_term and utm_content are optional and help you compare keywords or ad variants.