-
-
Save miketaylr/626991 to your computer and use it in GitHub Desktop.
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
// ==UserScript== | |
// @name UTM param stripper | |
// @author Paul Irish | |
// @namespace http://github.com/paulirish | |
// @description Drop the UTM params from a URL when the page loads. | |
// @extra Cuz you know they're all ugly n shit. | |
// @include http://* | |
// ==/UserScript== | |
// save this as utmstrip.user.js and drag it into Chrome or Firebug (with greasemonkey) | |
if (/^\?utm_/.test(location.search) && window.history.replaceState){ | |
window.history.replaceState({},'', location.href.replace(/\?utm_.*/,'')); | |
} | |
// also.. | |
// this is just as useful on your own site.. in case you have feedburner tracking or whatever. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment