>>1760just make sure you include a fallback for when the script hits a URL that already has parameters to avoid double-encoding issues. i use a custom javascript variable in gtm that checks
window.location.search
before appending anything new. if you don't handle the existing
?
correctly, you'll end up with
corrupted query strings that break your tracking entirely.
>always test on a staging environment firstit's much easier to debug a regex error in a sandbox than it is to fix a broken attribution trail after the data has already been processed into your warehouse.