1.5.1 • Published 1 year ago

access-data-parser v1.5.1

Weekly downloads
484
License
MIT
Repository
github
Last release
1 year ago

Access Data Parser

This module will receive document.referrer and some query params to determine where access come from.

Install

pnpm add access-data-parser

Usage

import AccessData from 'access-data-parser'

const queriesFromBrowser = {
  utm_source: "",
  utm_medium: "",
  utm_campaign: "",
  utm_content: "",
  utm_term: "",
  referrer: "https://google.com/"
};

console.log(new AccessData(queriesFromBrowser));
/* expected:
 {
   source: 'google',
   medium: 'organic',
   referrer: 'https://google.com/',
   channel: 'organic'
 }
*/

Params Supported

  • source
  • medium
  • campaign
  • content
  • term
  • referrer
  • fbclid
  • gclid

Default Channels

  • direct
  • organic
  • social
  • paid
  • display
  • referral

Contributing

PRs accepted.

License

MIT © ANDRÉ VAN DAL

Contributors ✨

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!

1.5.1

1 year ago

1.5.0

4 years ago

1.4.1

5 years ago

1.4.0

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.0.1

5 years ago

0.0.1

5 years ago