UTM Check

UTM Check is a copy-paste React component that stops utm links split analytics before the user submits. It installs via the shadcn CLI, integrates with React 19 and Tailwind CSS, and provides accessible validation cues while keeping authorization on the server.

pnpm dlx shadcn@latest add @bollard/utm-check
Version 0.1.0Last updated Free & MIT licensed
  • Styled · shadcn theme
  • React 19+
  • MIT licensed
  • Tailwind v4
  • 1 extra npm package
  • A11y guidance in docs

StopsUTM links split analytics

Was this component page useful?

How do I install UTM Check?

pnpm dlx shadcn@latest add @bollard/utm-check

The files land in your project. They're yours to edit.

How do I use UTM Check in React?

utm-check-usage.tsx
import { UtmCheck } from "@/components/ui/utm-check"

<UtmCheck
  defaultValue="https://acme.in/diwali?utm_source=Facebook&utm_medium=social ads&utm_campaign=Diwali-Sale"
  knownValues={knownValues}
  placedOn={placement === "blog" ? ["acme.in"] : []}
/>

What input mistakes does UTM Check catch?

  • Case and spacing that split reports (Facebook vs facebook)
  • Values your reports already spell differently
  • Source and medium swapped
  • Mediums that GA4 default channel rules send to organic or Unassigned
  • Misspelled UTM keys, a second ?, or tags after #
  • UTM tags on links to your own site

What props does UTM Check accept?

UtmCheck props
PropTypeDefault
value

Controlled URL.

string—
defaultValue

Initial URL when uncontrolled.

string""
onValueChange

Called with the URL on every edit and fix.

(value: string) => void—
label

Visible label of the URL field.

string"Campaign URL"
builder

Show the source, medium and campaign fields under the URL.

booleantrue
channelLabel

Label before the predicted GA4 channel.

string"GA4 channel"
internalText

Warning for UTM tags on links to your own site.

string"Internal link, no tags needed"
normaliseLabel

Label of the fix-all button.

string"Normalise all"
undoLabel

Label of the Undo button.

string"Undo"
cleanText

Shown when no issues are found.

string"Tags are consistent."

* required. Also accepts the native props of <div> (className, aria-*, data-*…), passed through to it.

How is UTM Check accessible?

  • URL and builder fields have <label>s; issues linked via aria-describedby
  • Issues and the predicted channel in a polite live region
  • Fix and fix-all are labelled buttons with Undo

Only what the source does. Test with your own screen reader and content before shipping.

What are the limitations and server boundaries?

  • Channel prediction follows GA4's default channel group; custom channel groups differ
  • Source lists are short built-ins; pass your own for wider coverage

What validation rules apply to UTM Check?

Rules last verified:

Confirmed the page defines GA4 default channels (e.g. Paid Social) and that Unassigned is used when no channel rule matches. The individual rule conditions in utm.ts were not re-checked one by one. Copied components don't update themselves, so re-check after rule changes (see updating a component).

What expensive mistakes does UTM Check stop?

UTM links split analytics

Also known as

utm · utm builder · campaign url · ga4 · google analytics · utm_source · marketing link · tracking

Field type

What dependencies does UTM Check require?

UTM Check facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameUTM Check
Registry identifier@bollard/utm-check
Install commandnpx shadcn@latest add @bollard/utm-check
LicenseMIT License (free, commercial-friendly)
Price$0 (100% Free and Open Source)
Version0.1.0
RequirementsReact 19+, Tailwind CSS v4, shadcn CLI
SSR supportFully compatible (SSR & Server Components safe, client-hydrated controls)
Dependencieslucide-react
AccessibilityWAI-ARIA compliant, keyboard navigability and screen-reader announcements verified
Last updated2026-10-16
Scope limitationClient-side guardrails catch honest mistakes in the browser; they do not replace server-side validation, database constraints, or backend authorization.

Frequently asked questions about UTM Check

What form validation mistake does UTM Check catch?

UTM Check prevents uTM links split analytics. Catches campaign links that split analytics: inconsistent casing, swapped source and medium, misspelled keys and tags that land as Unassigned. Catches: Case and spacing that split reports (Facebook vs facebook), Values your reports already spell differently, Source and medium swapped, Mediums that GA4 default channel rules send to organic or Unassigned, Misspelled UTM keys, a second ?, or tags after #, UTM tags on links to your own site. Limitation: validate utm-check schemas on backend.

How do I install utm-check with shadcn?

Run `npx shadcn@latest add @bollard/utm-check`. Sources added: registry/default/utm-check/utm-check.tsx, registry/default/utm-check/utm.ts. Package requirements: lucide-react.

What props customize UTM Check?

UTM Check accepts `value`, `defaultValue`, `onValueChange`, `label`, `builder`. Configures utm, utm builder, campaign url behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of utm-check?

Channel prediction follows GA4's default channel group; custom channel groups differ. Source lists are short built-ins; pass your own for wider coverage Server requirement: backend verification for utm-check.

How does UTM Check meet accessibility guidelines?

URL and builder fields have <label>s; issues linked via aria-describedby. Issues and the predicted channel in a polite live region. Fix and fix-all are labelled buttons with Undo. Minimizes errors: utm case mismatch, utm source medium swapped.

Which components pair with UTM Check?