Fresh URL

February 19th, 2014

Fresh URL is a JavaScript library that strips away all of the extra cruft at the end of URLs but does so only after each service that uses that cruft gets the data they need.

Brendan Schwartz, CTO of Wistia, writing on their company blog on how it works:

Here‘s how it works. Fresh URL detects which analytics providers you‘re using and sets up watches on them to see when they‘re ready. Once Fresh URL confirms that each provider has extracted the information it needs from the URL, it calls replaceState to remove the UTM codes.

Nice of them to release it as open source. Kudos Wistia.