Skip to content

Instantly share code, notes, and snippets.

@mackuba
Created October 27, 2011 12:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mackuba/1319447 to your computer and use it in GitHub Desktop.
Save mackuba/1319447 to your computer and use it in GitHub Desktop.
Bookmarklet which deletes that utm_* crap from the URL
javascript:(function() { var s = ""; var args = location.search.substring(1).split('&'); for (var a = 0; a < args.length; a++) { var key = args[a].split('=')[0]; if (!key.match(/^utm_/)) { s += '&' + args[a]; }} if (s) { s = '?' + s.substring(1); } location.href = location.origin + location.pathname + s; })()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment