Last active
          December 3, 2019 23:57 
        
      - 
      
 - 
        
Save kiding/589242021df49eb17be3 to your computer and use it in GitHub Desktop.  
    safari-utm-stripper Bookmarklet
  
        
  
    
      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
    
  
  
    
  | javascript:(function()%7Bvar%20e%3Dwindow.location.href%3Bvar%20t%3De.indexOf(%22%3F%22)%3Bif(e.indexOf(%22utm_%22)%3Et)%7Bvar%20n%3De.replace(%2F(%5B%3F%26%5Dutm_(source%7Cmedium%7Cterm%7Ccampaign%7Ccontent)%3D%5B%5E%26%23%5D%2B)%2Fig%2C%22%22)%3Bif(n.charAt(t)%3D%3D%3D%22%26%22)%7Bn%3Dn.substr(0%2Ct)%2B%22%3F%22%2Bn.substr(t%2B1)%7Dif(n!%3De)%7Bhistory.replaceState(null%2Cnull%2Cn)%7D%7D%7D)(); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
safari-utm-stripper is an extension that automatically strips UTM query string attached to the URL. You can download the extension here.
This gist is a bookmarklet version of the project. Once added to your bookmark, you can use it on your iDevices too.