Short answer: The # part of a link, called the fragment, stays in the browser and is not sent to the website's server. UTM tags placed after it may never reach your analytics. Put the ? and all your tags before the #, and keep the #section at the very end.
What is the # part of a link?
Fragment: the part of a web address after a #, used to jump to a section of a page or by single-page apps to track screens, and handled only by the browser.
The web standards are clear on this. RFC 3986 says the query ends at a #, and that the fragment is separated from the rest of the link before it's requested. MDN puts it more plainly: the fragment "is not sent to the server".
Will analytics read UTM tags after a #?
Don't rely on it. The server never sees them, and we found no documentation saying Google Analytics reads UTM tags from the fragment. Treat tags after # as lost and move them.
Even if a script on the page could read the fragment, other parts of your stack probably can't: server logs, redirects, ad platform tags and attribution tools all work from the part before the #.
Why does this happen?
- Links to a section: someone links to
example.com/#offerand adds tags to the end. - Single-page sites: some sites use
#/pageaddresses, so every link already contains a#. - Templates: an email or ad tool appends
?utm_...to the very end of whatever link it's given.
Example
Tags added after the section link:
https://example.com/#offer?utm_source=newsletter&utm_medium=email&utm_campaign=oct
The fixed link, with tags first and the section at the end:
https://example.com/?utm_source=newsletter&utm_medium=email&utm_campaign=oct#offer
Both open the same section of the page. Only the second sends the tags with the request.
How to fix it
- Paste the link into the link checker. It flags parameters that come after the
#. - Cut everything from the
#up to the first tag, such as#offer. - Paste it back at the very end of the link, after the last tag.
- Check that the link now has a
?before the tags, and only one. See two question marks. - If your site uses
#/addresses for every page, ask your developers how they want campaign tags passed. Don't assume the analytics tag will read them. - Build future links in the UTM builder, then add the
#sectionat the end if you need one.