Skip to content

Latest commit

 

History

History
62 lines (43 loc) · 1.56 KB

README.md

File metadata and controls

62 lines (43 loc) · 1.56 KB

@distributed/custodi

Code Style npm version
npm downloads Package Phobia Bundle Phobia

Small library to save utm parameters into a session cookie.

Install

With yarn:

yarn add @distributed/custodi

With npm:

npm install @distributed/custodi

Usage

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

// location.search => ?utm_source=google&utm_campaign=campaignName&utm_medium=medium&utm_content=content&utm_term=term
custodi({ timeout: 30, query: location.search });

Coming soon

  • Support SSR
  • Add more options for cookies, name, etc.

Development

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