I’ve decided to add URL parameters to my articles so I can do some custom analysis. However, Ghost is rewriting the parameters whenever I save the article.
Example
https://forwardky.com/walzs-freeport-moment?tag=commentary
becomes
https://forwardky.com/walzs-freeport-moment-tag-commentary
Is there something I can do about this? Am I writing the parameters wrong?
Where are you putting those urls with the query strings?
In the right-hand sidebar in the editor, in the URL field.
Yeah, you can’t put a query string in there. Those are just for urls— the stuff before the ?
What’s your goal here? Why would you want the query string to be set in the post editor?
As noted above – trying to figure out a way to do analysis on page views by tag (content type). I don’t know anywhere else I could add them.
I COULD go with it the way Ghost is rewriting it, and filter on that string (“-tag-news”). And if that’s the only way to do it, that’s what I’ll do. But I think I’d rather use query strings.
Ah, I see. If you had a new site, I’d say use a routes file to make the urls be like /primary_tag/title. But that’d break all your existing links, so don’t do that.
I just thought it was interesting that Ghost rewrote those for me. Certainly wasn’t expecting that.
Ah well – live and learn.
Marking this Solved.