Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

campaign-utm-tracker

jackmcpickle17MIT1.1.1TypeScript support: included

A simple UTM tracker for save conversion into Cloudflare KV workers

UTM, Tracker, Cookies, Worker, Clouflare, Cloudflare KV

readme

utm_tracker

Install

npm i @jackmcpickle/utm_tracker

Setup

import { utmTrack } from '@jackmcpickle/utm_tracker';
const CLIENT_ID = 'YOUR_CLIENT_ID';
utmTrack(CLIENT_ID).send();

Track conversions

import { utmSendConvert } from '@jackmcpickle/utm_tracker';
const orderId = 'ABC123';
const orderTotal = 10.0;
const CLIENT_ID = 'YOUR_CLIENT_ID';
utmTrack(CLIENT_ID).convert(orderId, orderTotal);