How to Have a 301 Redirect Pass Google Analytics UTM Parameters

There is no secret to getting a 301 redirect to pass some sort of UTM string in a 301 redirect.

It took me a half hour of Googling to realize, that at least for our nginx setup, it just worked!

So if we have a marketing URL out in the wild and then we launch the site and the URL changes, the UTMs still seem to be passing.

I wrote this in hopes of helping others who are wasting time when it might just work! Try it out!

Exit mobile version