Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pdehaan/strip-utm
Removes utm tracking codes from a URL query string.
https://github.com/pdehaan/strip-utm
Last synced: 2 months ago
JSON representation
Removes utm tracking codes from a URL query string.
- Host: GitHub
- URL: https://github.com/pdehaan/strip-utm
- Owner: pdehaan
- Created: 2015-02-01T22:09:01.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-02-01T22:52:51.000Z (almost 10 years ago)
- Last Synced: 2024-10-13T11:58:18.258Z (3 months ago)
- Language: JavaScript
- Size: 133 KB
- Stars: 8
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# strip-utm
Removes utm tracking codes from a URL query string.
## Installation
```sh
$ npm install strip-utm --save
```## Usage
```js
var stripUtm = require('./strip-utm');var theUrl = 'http://example.com/?utm_campaign=RSS-Feedburner-All-Partial&utm_cid=RSS-Feedburner-All-Partial&utm_medium=feed&utm_source=feedly&utm_reader=feedly&z=last&m=middle&a=first&t=upper-middle';
console.log(stripUtm(theUrl));
```### Output:
```
http://example.com/?a=first&m=middle&t=upper-middle&z=last
```