Skip to main content
Setting up UTM Rules for the first time? Start with the UTM naming convention playbook to define your approved source, medium, and campaign values before configuring the rules engine.

What it is

UTM Rules is the validation engine that runs whenever a link is created or updated. One rule set per workspace. It applies in this order:
  1. Force lowercase (default ON) - Summer_Salesummer_sale
  2. Space replacement (default _) - summer salesummer_sale
  3. Max length (default 100) - reject values longer than this
  4. Prohibited values - fail if value contains any banned term
  5. Allowed characters - fail if value doesn’t match the allowed pattern

When to use it

  • Marketing team of more than one person - drift is guaranteed without rules.
  • Anyone publishing UTMs to a shared analytics tool (GA, Mixpanel) where casing/typos create duplicate rows.
  • Agencies enforcing client-specific naming conventions.

How to configure

1

Open the rules page

Sidebar → UTM Rules.
2

Set the basics

forceLowercase
default:"true"
Lowercase all values on save.
spaceCharacter
default:"_"
Replace runs of whitespace with this. Common values: _, -, +.
Space Character dropdown - Underscore selected, with Hyphen, Plus, URL Encoded, and Remove spaces options each showing a live preview
maxParameterLength
default:"100"
Per-field character limit. 100 is a sensible default for human-readable UTMs.
prohibitedValues
Substrings that fail validation. Case-insensitive contains-match.
allowedCharactersRegex
Optional. Values that don’t match this pattern are rejected.
3

Save and test

Try creating a link with bad values. Validation errors appear inline on the failing fields.
UTM Rules page - Space Character, Force Lowercase toggle, Max Length, Allowed Characters regex, and Prohibited Values settings

Real-world example

Force consistency across the whole team:
  • Force lowercase: on
  • Space character: underscore
  • Allowed characters: letters, numbers, underscores, hyphens only
  • Blocked values: test, draft, tbd
No more Summer Sale! slipping into prod.

Common mistakes

^[a-z]+$ rejects digits. Most teams want ^[a-z0-9_-]+$. Test your regex on existing valid values before saving.

Edge cases

Rules cleaning vs validation. Steps 1-2 (lowercase, space replacement) transform values silently. Steps 3-5 (length, prohibited, allowed characters) reject the save with errors.
Default rules ship per workspace. Every new workspace starts with force lowercase on, underscore for spaces, and a 100-character max length automatically.