Small library to save utm parameters into a session cookie.
With yarn:
yarn add @distributed/custodi
With npm:
npm install @distributed/custodi
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 });
- Support SSR
- Add more options for cookies, name, etc.
- Install dependencies using
yarn install
ornpm install
- Start development server using
yarn watch