Marketing attribution: HTML anchor links and UTM parameters—here’s how to make them work together

Usually, you just attach UTM parameters to the end of a link and it’s fine.


But if you’re linking to a specific section of a webpage using an anchor link, attaching the UTM parameter to the end will mess things up—basically it will render the anchor link useless. Instead, it will just link to the webpage, but not the intended section of the webpage.

For example, let’s say you want to link to the Musashi as an artist section of that article, the link would look like this:

If you wanted to append UTM parameters to that link for tracking purposes, you might be tempted (as I was) to add the UTM parameters to the end of that, but that wouldn’t work.

Solution: Switch the position of the anchor link and the UTM parameter. Like this:

So the structure is:

URL + UTM parameters + HTML anchor

I learned this after attempting it wrongly, googling it, and like so many times the answer was on StackExchange.