referral-parser
Version:
Parse a referral url into useful information
43 lines (27 loc) • 865 B
Markdown
Referral Parser
===============
const Referral = require('referral-parser');
let refObj = new Referral('http://www.google.co.uk/?q=bbc+news');
```
```json
{
"type": "search",
"name": "Google",
"search": "bbc news",
"host": "www.google.co.uk"
}
```
```bash
$ npm install referral-parser
```
- Fast
- Extensible
Two of the biggest analytics companies have their own open source data sets of referring websites. Overtime these have become quite separated and no longer aligned meaning you choose one or the other. Referral Parser combines these two sets of data, filters them and makes them available as a single list.
We can then use this dataset, feed in our referral string and get some useful information back.
[ ](LICENSE)
```js