Post with query params is getting redirected

Hello! I am wondering if people have any thoughts on how to best add url params t for gAnalytics to links to Ghost posts, for example

This doesn’t seem to work consistently, I see that Ghost sends a 301, redirects to the page w/o the query string, and then sends a 304 and redirects to itself.

This seems even worse, it’s 301, 301, 304.

Just a 404.

Is there some better way? Thanks!

I see this seems to be specifically fallout from Dynamic Routing[1], I rolled our blog back to 1.23.1 and everything works again. I guess I will log that…

1: ✨Dynamic Routing Beta by kirrg001 · Pull Request #9596 · TryGhost/Ghost · GitHub

Hey! Thanks for the report. I can confirm this bug was introduced in 1.24.0.

1.24.1 is on the way. Could you please re-test the behaviour as soon as 1.24.1 was released?
That would be very helpful. I’ll leave a message as soon as it’s out :)

FYI: This didn’t work < 1.24.0.

We’ve just released 1.24.1.

Excellent! I can confirm it’s working as expected in 1.24.1 - thanks for the hustle!

1 Like