UTM Standard
Deterministic rules for generating UTM parameters. Given the same campaign, source, and distribution context, two conforming agents generate the same UTM.
Same context + same standard = same UTM.
Overview
What it does
Teams and AI agents tag the same campaign differently: LinkedIn, linkedin.com, li. Reports fragment, and channel attribution in Google Analytics drifts.
The UTM Standard removes the guesswork. It defines the inputs a generator needs, how each entry in parameters is derived, and what to return when context is missing. Parameter semantics come from Google Analytics. Canonical values come from its sources.
Required inputs
campaignThe approved campaign identity. An object with `slug` (preferred) and/or `name`.
sourceA canonical source or alias from `sources`, e.g. `linkedin`.
distribution-contextHow the asset is distributed for that source, e.g. `organic`, `paid`, `owned`, `display`. Must be one of that source's `contexts`.
Optional inputs: destination-url, campaign-id, source-platform, content, term, creative-format, marketing-tactic.
{
"campaign": {
"name": "Spring Product Launch"
},
"source": "linkedin",
"distribution-context": "organic",
"destination-url": "https://example.com/product"
}{
"status": "ok",
"standard-version": "0.3.0",
"parameters": {
"utm_source": "linkedin",
"utm_medium": "social",
"utm_campaign": "spring_product_launch"
},
"url": "https://example.com/product?utm_source=linkedin&utm_medium=social&utm_campaign=spring_product_launch"
}Standard
Parameters
The minimum-conforming-set is utm_source, utm_medium, utm_campaign. Recommended and optional parameters are set only from supplied inputs. Agents never invent values.
| name | requirement | value-source | derivation |
|---|---|---|---|
| utm_source | Required | `sources` | The canonical-source of the resolved source. google-meaning: The referrer of the traffic, such as a search engine, newsletter, or other source. semanticsGoogle-defineddefault-basisSchemaFirst default overridable: |
| utm_medium | Required | Source + distribution context | contexts[distribution-context].utm_medium of the resolved source. google-meaning: The marketing medium, such as cpc, banner, or email newsletter. semanticsGoogle-defineddefault-basisSchemaFirst default overridable: |
| utm_campaign | Required | Approved campaign identity | campaign.slug exactly if present; otherwise the campaign slug algorithm applied to campaign.name. google-meaning: The name of the campaign, product, promotion, or other identifier. semanticsGoogle-defineddefault-basisSchemaFirst default overridable: |
| utm_id | Recommended | Campaign system | The campaign ID from the system of record, passed through unchanged. google-meaning: The campaign ID used to identify a specific campaign or promotion. semanticsGoogle-defineddefault-basisSchemaFirst default overridable: |
| utm_source_platform | Recommended | Platform | The buying or management platform directing the traffic, when one exists. Normalized with the value format rule. google-meaning: The platform responsible for directing traffic to a given property, such as a buying platform that sets budgets and targeting criteria. applies-when: A buying or management platform directs the traffic. semanticsGoogle-defineddefault-basisSchemaFirst default overridable: |
| utm_content | Optional | Creative / asset | The creative or asset identifier, normalized with the value format rule. google-meaning: Used to differentiate ads or links that point to the same URL. semanticsGoogle-defineddefault-basisSchemaFirst default overridable: |
| utm_term | Optional | Keyword / targeting | The paid keyword or targeting term, normalized with the value format rule. google-meaning: Identifies paid search keywords. semanticsGoogle-defineddefault-basisSchemaFirst default overridable: |
| utm_creative_format | Optional | Creative format | The creative format, normalized with the value format rule. google-meaning: The type of creative, such as display, native, video, or search. semanticsGoogle-defineddefault-basisSchemaFirst default overridable: |
| utm_marketing_tactic | Optional | Marketing tactic | The targeting criteria or tactic, normalized with the value format rule. google-meaning: The targeting criteria applied to a campaign, such as remarketing or prospecting. semanticsGoogle-defineddefault-basisSchemaFirst default overridable: |
Standard
Campaign naming
utm_campaign represents campaign identity. It is not a container for every available marketing dimension.
precedence
- If campaign.slug exists, use it exactly. Do not re-normalize it.
- Otherwise derive the slug from campaign.name with the slug algorithm.
- If neither exists, return requires-context with campaign in missing.
slug-algorithm
- Apply Unicode NFKD normalization and remove combining marks.
- Convert to lowercase.
- Replace every run of characters outside a-z and 0-9 with a single underscore.
- Trim leading and trailing underscores.
constraints
- pattern
^[a-z0-9]+(_[a-z0-9]+)*$- character-set
a-z, 0-9 and _- separator
_- stable-for-campaign-lifetime
true
must-not-add-unless-part-of-identity
- source
- medium
- platform
- placement
- creative
- audience
- ad-set
- keyword
- date
- year
- quarter
examples
{ "input": { "name": "Spring Product Launch" }, "utm_campaign": "spring_product_launch" }{ "input": { "slug": "spring_product_launch", "name": "Spring Product Launch 2026" }, "utm_campaign": "spring_product_launch" }
Standard
Generation
generation.steps
- 1Resolve source to an entry in sources by exact match on canonical-source or aliases, case-insensitive.
- 2Resolve distribution-context against that source's contexts.
- 3Set utm_source and utm_medium from that source.
- 4Set utm_campaign from campaign naming precedence.
- 5Set recommended and optional parameters only from supplied inputs. Never invent values.
- 6Apply the organization profile, if any.
- 7Assemble the URL using url-assembly.
url-assembly
parameter-order: utm_source, utm_medium, utm_campaign, utm_id, utm_source_platform, utm_content, utm_term, utm_creative_format, utm_marketing_tactic
- Remove any existing utm_* parameters from the destination URL.
- Preserve all other existing query parameters in their original order.
- Append UTM parameters after existing parameters in parameter-order.
- Omit parameters that have no value. Never emit an empty parameter.
- Percent-encode values per RFC 3986. Conforming values require no encoding.
- Preserve the URL fragment after the query string.
Responses
success-response.
{
"status": "ok",
"standard-version": "0.3.0",
"parameters": {
"utm_source": "linkedin",
"utm_medium": "social",
"utm_campaign": "spring_product_launch"
},
"url": "https://example.com/product?utm_source=linkedin&utm_medium=social&utm_campaign=spring_product_launch"
}missing-context. Do not guess. Return a requires-context response listing every missing required input.
{
"status": "requires-context",
"missing": [
"distribution-context"
]
}unknown-source. Do not invent a source. Return an unknown-source response.
{
"status": "unknown-source",
"source": "<input>"
}unsupported-context. Do not substitute a different context. Return an unsupported-context response listing supported contexts.
{
"status": "unsupported-context",
"source": "<canonical-source>",
"supported": [
"<context>"
]
}Provenance
What Google defines, what SchemaFirst defines
Every parameter and source is labeled with where its value comes from. SchemaFirst is an independent community standard. It is not authored or endorsed by Google.
- Google-defined
Semantics, supported parameters, channel behavior, and documented recommendations from Google Analytics.
- SchemaFirst default
Canonical implementation decisions made by SchemaFirst for deterministic agent generation. Not authored or endorsed by Google.
- Organization-defined
Values supplied by the adopting organization through an explicit organization profile. Whether a default may be replaced is stated by each parameter's `overridable`.
references
- URL builders: Collect campaign data with custom URLsUTM parameter family, parameter meanings, UTM best practices
- Default channel groupChannel classification rules for manually tagged traffic
- Traffic-source dimensions, manual tagging, and auto-taggingHow UTM parameters map to dimensions; interaction with auto-tagging
- About traffic-source dimensionsDefinitions of source, medium, campaign, campaign ID, source platform
Overrides
Organization profiles
Organization profile > SchemaFirst default. Google-defined parameter semantics cannot be overridden.
permitted
- Require recommended or optional parameters.
- Define proprietary sources.
- Define additional distribution contexts.
- Override defaults marked as overridable.
- Define where organization-owned values come from.
not-permitted
- Redefine the meaning of Google-defined UTM parameters.
- Remove a parameter from the minimum conforming set.
- Change the campaign slug algorithm.
{
"extends": "https://www.schemafirst.org/standards/utm/0.3",
"organization": "Example Company",
"overrides": {
"utm_id": {
"required": true
}
}
}Community
Versioning and contributions
Versioning scheme: semver. Changes to any of the following require a major version:
- parameter semantics
- required fields
- campaign naming
- generation behavior
- override precedence
Non-breaking changes:
- Adding a source
- Adding a distribution context to a source
Propose sources, contexts, and changes through GitHub as pull requests against standard.json.
Licensed under Apache-2.0.