Skip to content

Instantly share code, notes, and snippets.

@bschwartz
Created November 6, 2014 18:15
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bschwartz/3c979eccbe6f4cd65c7a to your computer and use it in GitHub Desktop.
Save bschwartz/3c979eccbe6f4cd65c7a to your computer and use it in GitHub Desktop.
Scrub all query params with FreshURL
FreshUrl.waitsFor(function(){freshUrl.allReady()}).then(function(){
// This will fire once all analytics platforms are ready
// Scrub everything in the query string, not just utm_*
window.history.replaceState({}, '', window.location.pathname + window.location.hash);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment