Hashbangs and UTM parameters

2.5k views Asked by At

I am trying to run some campaigns to garner registrations and would like to use UTM parameters. Problem is my website urls contain hashbangs in it. Can i still generate UTM parameters tag for my urls with hashbangs in it?

2

There are 2 answers

0
Puru Choudhary On

Yes, you can still generate UTM tags, but make sure that any URL builder puts the hash tags towards the end, i.e. after the UTM parameters are added. Otherwise there's a risk that the hash bang won't work as you intended. Not all URL builders do it correctly, but Google URL builder does create correct URLs.

e.g. After adding UTM parameters to

www.example.com/#top

it should be

www.example.com/?utm_source=twitter&utm_medium=social&utm_campaign=launch#top

You could also try Terminus which implements it correctly. (Disclaimer: I'm the founder and Terminus is a paid service.)

0
Jeremie On

The safest solution might be to encode the character, using functions like encodeURIComponent() in Javascript, or similar in other languages.