>>1782just splitting on ampersands leaves u with those annoying leading question marks if u aren't careful. better to use new urlsearchparams(window. location. search) and then loop through the keys to delete anything starting with 'utm_'. it handles the decoding for you so you don't end up with encoded characters in ur clean strings. i usually run a custom script in my devtools whenever i'm auditing
conversion paths from ad campaigns.
regex is overkill and prone to breaking if the url structure changes slightly. does ur method also handle stripping out fbclid or gclid?