hello there i like to remove the facebook analytic forced url parameter /?fbclid=
https://www.example.com/?fbclid=...
, from my host url, when redirected from facebook by clicking the url, the problem is the nuxt-link-exact-active class is not applied if redirected with this parameter.
Thanks
In simple cases like https://www.example.com/?fbclid=...
where fbclid is the only parameter, it should be a trivial Javascript like that:
<script>
// ideally this is on top of page; works on bottom as well
if(/^\?fbclid=/.test(location.search))
location.replace(location.href.replace(/\?fbclid.+/, ""));
</script>
This checks if ?fbclid=...
is a URL search parameter and navigates to the same location with that part removed.
fbclid
.
<script>
if(location.search) location.replace(location.href.replace(/\?.+/, ""));
</script>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With