Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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
```