Created
February 16, 2014 09:32
-
-
Save gpakosz/9031730 to your computer and use it in GitHub Desktop.
Remove GA cruft
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (window.history && history.replaceState && (location.search.match(/utm_/) || location.hash.match(/utm_/))) { | |
search = location.search.replace(/(\?|\&)?utm_[a-z]+=[^\&]+/g, '') | |
hash = location.hash.replace(/(#|\&)?utm_[a-z]+=[^\&]+/g, '') | |
history.replaceState({}, '', location.pathname + search + hash); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment