Repository navigation
Getting Started
Alexandr Krikun edited this page Oct 26, 2026
·
1 revision
Node.js 18 or newer. No other dependencies.
# one-off run
npx github:ksanyok/utm-builder https://example.com --source newsletter --medium email --campaign spring_sale
# global CLI
npm install -g github:ksanyok/utm-builder
# as a library in your project
npm install github:ksanyok/utm-builderutm-builder https://example.com --source newsletter --medium email --campaign spring_saleWhen building, the tagged URL is printed to stdout (so you can pipe it) and any warnings go to stderr. With --check, the UTM parameters found are listed, followed by problems: ✖ errors break attribution, ! warnings split or misclassify traffic.
| Code | Meaning |
|---|---|
| 0 | No errors (warnings allowed unless --strict) |
| 1 | Errors found (or warnings with --strict) |
| 2 | Bad arguments or the check could not run |
Check a link someone sent you
utm-builder --check "https://example.com/?utm_source=Facebook&utm_medium=Social Media"Tag a list of links (one per line, optional ",source")
utm-builder --batch links.txt --medium email --campaign october_digest > tagged.txtKeep the original case and use dashes
utm-builder https://example.com --source LinkedIn --medium social --campaign "Q4 Launch" --keep-case --separator -Use the online UTM Builder.
Home · Getting started · FAQ · Troubleshooting · Online tool