0.1.3 • Published 2 months ago

@distributed/utm v0.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

preview

Build Status npm version Dependencies npm downloads code style: prettier License: MIT

Small library to parse utm parameters.

Install

With yarn:

yarn add @distributed/utm

With npm:

npm install @distributed/utm

Usage

import { utm } from '@distributed/utm';

// location.search => ?utm_source=google&utm_campaign=campaignName&utm_medium=medium&utm_content=content&utm_term=term
const utms = utm(location.search);

console.table(utms);

/* =>
{
  "utm_source": "google",
  "utm_campaign": "campaignName",
  "utm_medium": "medium",
  "utm_content": "content",
  "utm_term": "term"
}
/*

Try it live

curl "https://utm.distributed.sh/?utm_source=google&utm_campaign=campaignName&utm_medium=medium&utm_content=content&utm_term=term"

# =>
# {
#   "utm_source": "google",
#   "utm_campaign": "campaignName",
#   "utm_medium": "medium",
#   "utm_content": "content",
#   "utm_term": "term"
# }

Development

  1. Install dependencies using yarn install or npm install
  2. Start development server using yarn watch

📑 License

MIT License

0.1.3

2 months ago

0.1.2

5 months ago

0.1.1

5 months ago

0.1.0

7 months ago

0.0.8

2 years ago

0.0.6

2 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago