I am tracking URLs with "posName" parameters like:
example.com?posName=Content+&+Community+Manager+(H/F)
But my code returns "Content" only:
function () {
var uri = document.location.href;
var uri_dec = decodeURIComponent(uri);
var url = new URL(uri_dec);
var posName= url.searchParams.get("posName");
return posName;
}
How can I get the full parameter?
EDIT: I have another URL like:
exemple.com?posName=Club+&+Animator+(H/F)
And the code returns the full parameter... So is it the length of the parameter which causes this issue?