UTM Rules Overview
Learn how to automate and enforce UTM parameter standards with linkutm’s powerful rules engine.What are UTM Rules?
UTM Rules allow you to automatically standardize, validate, and enforce consistency across all your UTM parameters. Instead of manually checking every link for compliance, set up rules once and let linkutm ensure quality automatically.Why Use UTM Rules?
Benefits
Automatic Standardization- Enforce lowercase or specific formatting
- Replace spaces automatically
- Consistent parameter values
- Clean analytics data
- Prevent common errors
- Catch typos before links are created
- Validate parameter formats
- Ensure completeness
- Everyone follows same standards
- No need to memorize rules
- New members automatically compliant
- Reduced training time
- No manual checking required
- Automatic corrections
- Fewer link edits needed
- Focus on strategy, not syntax
- Cleaner data in analytics
- Easier reporting
- More accurate attribution
- Better insights
Types of UTM Rules
1. Project Rules
Global settings that apply to all links in a project. Space Character Replacement Replace spaces in UTM parameters with:- Nothing (remove spaces):
summer sale→summersale - Hyphen:
summer sale→summer-sale - Underscore:
summer sale→summer_sale(recommended) - Plus:
summer sale→summer+sale - URL Encoded:
summer sale→summer%20sale
- Convert all UTM parameters to lowercase
- Prevents:
Facebookvsfacebookdiscrepancies - Result: Consistent
facebookalways
- Set default shortener for all links
- Can be overridden per link
- Ensures consistency
- Block specific parameter values
- Prevent common mistakes
- Example: Block
test,asdf,xxx - Shows error if user tries to use
2. Standardization Rules
Transform parameter values based on conditions. What They Do:- If parameter contains X, replace with Y
- Pattern-based replacements
- Multiple rules can apply
- Applied in order
- Enable or disable rules without deleting
- Test rules before full rollout
- Temporarily disable for special cases
3. Required Field Rules
Validation rules that must be satisfied before creating a link. Validation Types: Minimum Characters (minChar)- Ensure parameter has at least X characters
- Example: utm_campaign must be at least 5 characters
- Prevents:
fb,x,a(too short)
- Limit parameter to X characters
- Example: utm_campaign max 50 characters
- Prevents overly long values
- Advanced pattern matching
- Complex validation rules
- Example:
^[a-z0-9_]+$(only lowercase, numbers, underscores) - Flexible and powerful
- Force specific parameters to be filled
- Example: Require utm_term for all paid campaigns
- Context-aware requirements
Setting Up UTM Rules
Access UTM Rules
- Navigate to Dashboard → UTM Rules
- Or Settings → UTM Rules
- Select your project
- View existing rules or create new
Create Project Rules
- Go to UTM Rules → Project Rules tab
- Configure space replacement
- Toggle force lowercase
- Set default shortener
- Add prohibited values (comma-separated)
- Save settings
Create Standardization Rules
- Go to UTM Rules → Standardization Rules tab
- Click Create Rule or + Add Rule
- Enter rule details:
- Rule name
- Apply to parameter (source, medium, campaign, etc.)
- Condition (contains, equals, starts with, etc.)
- Value to match
- Replacement value
- Toggle active/inactive
- Save rule
- Rules applied top to bottom
- First match may prevent other matches
- Drag to reorder if available
Create Required Field Rules
- Go to UTM Rules → Required Fields tab
- Click Create Rule or + Add Rule
- Configure rule:
- Parameter to validate
- Validation type (minChar, maxChar, regex)
- Validation value
- Error message (user-facing)
- Conditional logic (optional)
- Save rule
How Rules Work
When Rules Apply
During Link Creation:- User enters UTM parameters
- Project rules apply first (lowercase, spaces)
- Standardization rules transform values
- Required field rules validate
- If all pass: Link created
- If validation fails: Error shown
- See transformations as you type (if supported)
- Immediate validation errors
- Clear error messages
- Suggestions for fixes
What Rules Don’t Affect
Existing Links:- Rules don’t retroactively change existing links
- Only apply to new links or edited links
- Historical data preserved
- Templates created before rules still work
- New templates follow rules
- Editing template applies current rules
UTM Rules Best Practices
Start Simple
Phase 1: Project Rules Only- Enable force lowercase
- Set space replacement
- Add a few prohibited values
- 2-3 rules for common variations
- Focus on high-impact standardizations
- Minimum length requirements
- Simple regex patterns
- Complex conditional logic
- Comprehensive standardization
- Strict validation
Common Rule Sets
Basic Rules (Good for Most Teams):Documentation
Document Your Rules:- Include in onboarding docs
- Post in team wiki
- Review in training
- Regular reminders
Testing Rules
Before Rolling Out:-
Create Test Project:
- Set up rules in test environment
- Try various parameter combinations
- Verify transformations work correctly
-
Test Edge Cases:
- Very long values
- Special characters
- Mixed case
- Empty values
- Unusual combinations
-
Team Testing:
- Have team members create test links
- Gather feedback
- Adjust rules based on input
-
Gradual Rollout:
- Start with one project
- Monitor for issues
- Expand to all projects
Managing Rules
Editing Rules
Standardization and Required Field Rules:- Find rule in list
- Click Edit
- Modify settings
- Save changes
- Applies to future links immediately
- Go to Project Rules tab
- Update settings
- Save
- Applies to all new links in project
Disabling Rules Temporarily
Standardization Rules:- Toggle Active switch to OFF
- Rule stops applying
- Don’t need to delete
- Re-enable anytime
- Testing without rule
- Special campaign exception
- Troubleshooting
- Gradual migration
Deleting Rules
- Find rule
- Click Delete or trash icon
- Confirm deletion
- Rule removed permanently
- Future links no longer affected
Rule Priority and Order
If Multiple Rules Match:- Applied in order shown
- First transformation applies
- May affect subsequent rules
- Reorder for different results
Troubleshooting
Rule Not Working
Check:- Is rule active/enabled?
- Does parameter match exactly?
- Is rule order affecting it?
- Are project rules overriding?
- Test with simple case first
Too Many Transformations
Problem: Parameters changed unexpectedly Solutions:- Review all active rules
- Check rule order
- Disable rules one by one to identify culprit
- Simplify rule logic
Validation Too Strict
Problem: Can’t create links due to validation errors Solutions:- Review required field rules
- Relax character limits
- Simplify regex patterns
- Add exceptions for special cases
Team Confusion
Problem: Team doesn’t understand rule errors Solutions:- Improve error messages
- Document rules clearly
- Provide examples
- Training session
- Create quick reference guide
Advanced Features
Conditional Rules
Apply rules only in certain conditions:Rule Templates
Save rule sets for reuse:- Create standard rule set
- Apply to new projects
- Consistent across organization
- Easy setup for new projects
Bulk Rule Import
Import rules from CSV:- Migrate rules between projects
- Share rules across team
- Backup and restore
- Standardize enterprise-wide