Next.js Discord

Discord Forum

Pass through query params

Unanswered
Western Kingbird posted this in #help-forum
Open in Discord
Western KingbirdOP
I have a need to take any query params and then append them to the end of all outgoing URLs on a page, for tracking purposes... I'm using useRouter and grabbing the query off of that. I'm looking to just do a raw, straight passthrough. But somewhere along the line, HTML characters are encoded. So I start with something like this "utm_campaign=Advantage++10%25+Cap" and it ends up like this "utm_campaign=Advantage 10% Cap". Is there a way to stop that from happening so I just get the raw value?

3 Replies