Skip to content
utm-governancev0.1.0Analytics

Find broken UTM tags before they split your data

Every Monday it checks GA4 for unset sources, mixed-case spellings and mediums outside your rules, and checks your ad links for missing tags. You get a fix map to work from. It only reads.

Agent
UTM Governance
Runs
Weekly
Approval
Approval optional
Typical run
1 credits x 4 a month
Available on
SoloTeamScaleAgency
Needs access to
analytics traffic (read)web pages (fetch)
  • utm-audit

    UTM audit

    Issues by kind with sessions affected, GA4 issue table, a fix map (bad value, suggested value, confidence), the ad-URL section, internal-link findings, what changed since the last run, and gaps.

Outputs are recorded in the run history and can be routed to the approvals inbox.

This is the form you fill in when you enable the agent. It is generated from the agent's settings schema, so what you see here is exactly what the agent accepts.

Ga4 property id
ga4PropertyId / string

Your GA4 property id (Admin > Property details), e.g. 123456789. Without it GA4 is not checked.

No default

Lookback days
lookbackDays / integer

Days of GA4 traffic to read.

Default: 28. Range: 7 to 90

Min sessions
minSessions / integer

Total sessions below which percentage-based checks are switched off.

Default: 100. Range: 20 to 5000

Min sessions per row
minSessionsPerRow / integer

Sessions a source, medium and campaign row needs before it is reported.

Default: 10. Range: 1 to 500

Allowed mediums
allowedMediums / list

Medium values your naming rules allow. Leave empty to switch the medium check off.

Default: cpc, paid-social, email, social, referral, affiliate, display, video

Allowed sources
allowedSources / list

If not empty, any source outside this list is an issue. Leave empty to allow any source.

Default: none

Require lowercase
requireLowercase / boolean

Tag values must be lower case. A source, medium or campaign with capitals is reported even when it has only one spelling.

Default: on

Campaign separator
campaignSeparator / choice

Separator campaign names use between words.

  • hyphen
  • underscore

Default: hyphen

Required params
requiredParams / multi-select

Parameters every paid link must carry.

  • utm_source
  • utm_medium
  • utm_campaign
  • utm_content
  • utm_term

Default: utm_source, utm_medium, utm_campaign

Not set alert pct
notSetAlertPct / number

Alert when at least this percentage of sessions has an unset source or medium.

Default: 5. Range: 1 to 50

Scan pages
scanPages / list

Pages whose links are checked for internal UTM tags. Leave empty to skip.

Default: none

Max ads checked
maxAdsChecked / integer

Most ads checked in one run.

Default: 500. Range: 10 to 1000

UTM Governance

Tracking tags break quietly. "facebook" and "Facebook" split one channel into two rows, a paid link with no campaign tag lands as direct, and the weekly report undercounts the spend that works. This agent checks every row, every Monday.

What it does

It reads 28 days of GA4 sessions by source, medium and campaign (7 to 90 days, your choice) and runs the rules in code: unset source or medium above a share you set, several spellings of one value, alias groups such as fb and facebook, mediums and sources outside your lists, and campaign names that break your separator or case rules. When your ads account can be read it checks live ad final URLs for the parameters you require. When you list pages, it checks their links for internal UTM tags.

Inputs

  • Google Analytics 4 and your GA4 property id (required for the GA4 checks).
  • An ads account (optional; the section says "not checked" until that read exists).
  • Pages to scan (optional). Each page's links are checked for internal UTM tags; a page that cannot be read is listed as not checked.

Outputs

One UTM audit: issues by kind with sessions affected, a fix map with the value to use instead and whether a rule or the model suggested it, the ad-URL section, internal-link findings, what changed since the last audit (counts), and what could not be checked.

Approval

Not needed. It only reads. It changes nothing in GA4, your ad accounts or your website. The model sees only the tag values no rule could fix, and suggests a clean name; it never decides what is an issue.

Worked example

5,000 sessions over 28 days. 600 have an unset source (12%, over the 5% alert). "google" and "Google" split brand search. "fb" and "facebook" split paid social. "banner" and "cpm" are not in the allowed mediums. "Summer Sale" has a space and capitals. The audit lists each, the fix map says "google", "facebook", "display" and "summer-sale", and next Monday's audit reports the change in counts.