• Created in public
  • Governed by the community
  • Owned by no vendor
Draftv0.3

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

  • campaign

    The approved campaign identity. An object with `slug` (preferred) and/or `name`.

  • source

    A canonical source or alias from `sources`, e.g. `linkedin`.

  • distribution-context

    How 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.

Input
{
  "campaign": {
    "name": "Spring Product Launch"
  },
  "source": "linkedin",
  "distribution-context": "organic",
  "destination-url": "https://example.com/product"
}
Output — standard 0.3.0
{
  "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.

namerequirementvalue-sourcederivation
utm_sourceRequired`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: sources-only (Only through organization-defined sources)

utm_mediumRequiredSource + 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: sources-only (Only through organization-defined sources)

utm_campaignRequiredApproved 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: false (Not overridable)

utm_idRecommendedCampaign 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: requirement (Requirement can be overridden)

utm_source_platformRecommendedPlatform

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: requirement (Requirement can be overridden)

utm_contentOptionalCreative / 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: requirement (Requirement can be overridden)

utm_termOptionalKeyword / targeting

The paid keyword or targeting term, normalized with the value format rule.

google-meaning: Identifies paid search keywords.

semanticsGoogle-defineddefault-basisSchemaFirst default

overridable: requirement (Requirement can be overridden)

utm_creative_formatOptionalCreative 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: requirement (Requirement can be overridden)

utm_marketing_tacticOptionalMarketing 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: requirement (Requirement can be overridden)

Standard

Campaign naming

utm_campaign represents campaign identity. It is not a container for every available marketing dimension.

precedence

  1. If campaign.slug exists, use it exactly. Do not re-normalize it.
  2. Otherwise derive the slug from campaign.name with the slug algorithm.
  3. If neither exists, return requires-context with campaign in missing.

slug-algorithm

  1. Apply Unicode NFKD normalization and remove combining marks.
  2. Convert to lowercase.
  3. Replace every run of characters outside a-z and 0-9 with a single underscore.
  4. 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

  1. 1Resolve source to an entry in sources by exact match on canonical-source or aliases, case-insensitive.
  2. 2Resolve distribution-context against that source's contexts.
  3. 3Set utm_source and utm_medium from that source.
  4. 4Set utm_campaign from campaign naming precedence.
  5. 5Set recommended and optional parameters only from supplied inputs. Never invent values.
  6. 6Apply the organization profile, if any.
  7. 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

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.
organization-profile.example
{
  "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.