Setup and operations
Routing Traffic with UTM and Source Context
UTM values are useful campaign labels when their naming and trust boundaries are explicit; they are not proof of where a request originated.
Choose canonical campaign fields
Define allowed values for source, medium, campaign, content or creative, placement, and market. Use stable identifiers rather than free-form labels that differ by buyer, capitalization, or punctuation.
Understand client-controlled values
Query parameters can be copied or modified by anyone. Use them for segmentation and attribution according to policy, but combine them with referrer and request context when a stronger routing decision is required.
Preserve parameters intentionally
Map every redirect, tracker, public flow, and destination, then decide which fields each hop forwards. Test encoding, duplicate keys, empty values, and destination URLs that already contain their own query string.
Handle absent or unknown sources
Create an explicit action for a missing source, an unrecognized value, and a known source with contradictory context. Do not silently place all three cases into the largest campaign bucket.
Verify with a parameter matrix
Open canonical, missing, malformed, and unexpected source URLs, then compare the event fields and selected destination with the contract. Repeat whenever link generation or a tracker template changes.