Campaign UTM Policy Audit avatar

Campaign UTM Policy Audit

Pricing

$0.25 / completed report

Go to Apify Store
Campaign UTM Policy Audit

Campaign UTM Policy Audit

Audit campaign URLs against your UTM policy. Detect missing tags, duplicates, invalid encoding and conflicting campaign names. Export JSON, correction CSV and HTML.

Pricing

$0.25 / completed report

Rating

0.0

(0)

Developer

Gilad Ronen

Gilad Ronen

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Share

What does Campaign UTM Policy Audit do?

Audit existing campaign links against your team's declared UTM policy before an ad upload, newsletter send, or agency handoff. Submit JSON rows or CSV text and receive a correction queue with exact evidence, plus a complete JSON report and a downloadable HTML report.

The Actor checks supplied URLs without visiting them. It does not access analytics accounts, click ads, publish campaigns, or claim that tracking works. Google's campaign URL guidance explains that campaign values are case sensitive; the acceptable names, case rules, and source/medium combinations here come from your policy.

Why use a campaign UTM policy audit?

Use the same policy each week to find missing tags, inconsistent names, duplicate parameters, and undeclared macros before links are handed off. Compare stable row and finding IDs between reports. Exact aliases make suggested field values traceable to a decision your team already made.

Apify provides API access, scheduling, storage, and integrations for recurring campaign checks. This Actor does not need a browser, proxy, third-party account, or external language model.

How to audit campaign URLs

  1. Add an array of rows with string id and url fields. Optionally add campaignId to compare campaign names across rows, and channel as a descriptive label.
  2. Supply a policy object. An empty object requires utm_source, utm_medium, and utm_campaign; it adds no case restriction or value allowlist.
  3. Run the Actor with a charge limit of at least USD 0.25.
  4. Download the correction CSV and inspect its reasons, original values, expected policy, and explicit alias proposals. Consult the full report's policy for the complete allowlists.
  5. Apply approved corrections in your campaign system and audit the next export.

Input and policy

See the Input tab for the form and sample. Supply exactly one of rows or csv, alongside policy.

{
"rows": [
{
"id": "001",
"campaignId": "launch-09",
"url": "https://example.com/?utm_source=Google&utm_medium=cpc&utm_campaign=launch"
}
],
"policy": {
"requiredParameters": ["utm_source", "utm_medium", "utm_campaign"],
"allowedValues": { "utm_source": ["google", "newsletter"] },
"allowedSourceMediumPairs": [{ "source": "google", "medium": "cpc" }],
"casePolicy": "lowercase",
"aliases": { "utm_source": { "Google": "google" } },
"allowedMacros": ["{{campaign.name}}", "{Keyword}"]
}
}

allowedValues uses exact decoded strings. An empty allowedSourceMediumPairs array disables the pair rule. casePolicy is none, lowercase, or uppercase and applies to UTM values and explicitly configured parameters. It never changes a macro provider's token case. Mixed case alone is acceptable when no case rule or restrictive allowlist is declared.

Aliases are direct, exact mappings from an old field value to its canonical value. Alias chains, self mappings, and targets contradicting an allowlist or case rule are rejected. An alias suggestion does not change the original URL, and separate source/medium proposals still need review against the pair rule. No fuzzy correction or automatic lowercasing occurs.

Supported macro token shapes are {keyword}, {{campaign.name}}, ${campaign}, [CAMPAIGN], __CAMPAIGN_ID__, and %%CAMPAIGN%%. The token body accepts ASCII letters, digits, underscore, dot, colon, and hyphen. Each exact token must be in allowedMacros. Approved tokens yield informational deferred findings because their eventual value is unknown. Unapproved or malformed templates in monitored values are reported. Regular expressions and executable template expressions are not accepted.

CSV accepts UTF-8 BOMs, quoted commas, escaped quotes, and quoted newlines. Headers must be unique and have no surrounding whitespace; inconsistent row widths are rejected. Default columns are id,url,campaignId,channel, with the last two optional. To use different headers, provide columnMapping, for example {"id":"Link ID","url":"Destination","campaignId":"Campaign"}. Unmapped columns are ignored. IDs are strings: 001 remains 001. Empty/missing required IDs reject input; repeated IDs remain separate rows with findings.

Limits are 2,000 rows, 4 MB total JSON input, 12,000 characters per URL, and 100 query components per URL. Policies support 32 required parameters, 32 allowlist fields with up to 100 values each, 32 alias fields with 100 aliases each, 100 source/medium pairs, and 64 exact macros. Oversized per-URL queries become incomplete. An amplified report that cannot fit the safe 8 MB JSON / 9 MB per-export limits is rejected before a report event is requested; split that batch. The engine reserves 100 KB of report space for metadata while collecting evidence.

Output and evidence

One dataset item contains the complete report and its rows array. The Output tab offers a row view and download links for:

  • OUTPUT: full compact JSON, including policy, summary, query components, findings, and campaign conflict groups.
  • corrections.csv: one line per finding, plus one line for each pass row. This is a review queue, not a rewritten URL list.
  • report.html: escaped, standalone report with no scripts or external assets. Download the attachment to view it locally.

You can download the dataset in various formats such as JSON, HTML, CSV, or Excel. Use the dedicated correction CSV for flat finding-level data; a generic dataset CSV contains the enclosing report rather than the same flat queue.

FieldMeaning
rowKey, issueIdDeterministic identifiers for comparisons; duplicate input IDs receive distinct row keys
originalUrlExact supplied URL, including signed query bytes and fragment
statuspass, review, invalid, or incomplete
deferredSome checks require a macro's expanded value
issuesCode, severity, parameter, original values, expected policy, optional alias proposal, evidence references
campaignConflictsExact literal names associated with the same supplied campaign ID

pass means no findings under this policy. review can include a policy error, a generic URL warning, or a deferred macro check. invalid means unsupported URL syntax or malformed percent/UTF-8 encoding; incomplete means the query-component cap prevented auditing that row. Always inspect severity and reason rather than interpreting review as a tracking failure.

Query decoding treats + as space and %2B as a literal plus; %26 stays inside its value. Fragment contents cannot satisfy required query parameters. Empty monitored values and repeated monitored keys are errors. Unconfigured empty application flags and template-like values are preserved without UTM findings. Repeated unrelated keys get a generic warning because some applications intentionally use them. No winning duplicate value is selected.

CSV cells beginning with spreadsheet formula triggers receive a protective apostrophe, including leading-whitespace cases. JSON preserves source strings. Spreadsheet applications may infer numeric display types; import identifier columns as text if you need leading zeros displayed there.

Pricing and recovery

The price is USD 0.25 per completed report, using the single report-completed event. There is no startup charge, per-row charge, or additional dataset-item charge; platform usage is included. A completed report containing problems is still a completed report. Invalid input, insufficient budget, and report-size rejection produce no report event.

The dataset report is the primary paid result. If convenience exports fail after the dataset and charge are saved, resurrecting that same run verifies the input and saved report, then repairs the exports without a second dataset item or charge. An interrupted charge after the dataset write is completed once during recovery. Starting a new run is billable again. A charged run whose dataset was deleted cannot repair itself automatically.

Scope, privacy, and support

This is a supplied-data policy audit, not proof of attribution, destination availability, analytics tags firing, or advertising-platform macro support. It does not infer campaign identity from utm_id; cross-row name grouping uses only your explicit campaignId, and different IDs may legitimately share a name. Malformed or unresolved templates are not treated as literal campaign-name evidence.

Outputs retain the URLs and query values you submit, so use data you are authorized to process and avoid supplying live secrets. No URLs are fetched, and no customer links or values are written to application logs. Use the Actor's Issues tab for reproducible problems and the API tab for integration instructions.