Last active
September 5, 2017 09:33
-
-
Save scottcate/eeb1db780d9128a0c22079728996793b to your computer and use it in GitHub Desktop.
Purpose of this gist, is to store the contents of a bookmarklet. This let's me quickly add two UTM query string parameters to the current page in a browser.
This file contains 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(){ | |
var a = "scottca"; | |
var l = window.location; | |
var s = l.search; | |
var utms = (s?s+"&":"?")+"utm_source="+a+"&utm_medium=twitter"+l.hash; | |
l.assign(utms); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Revised to support the location.hash