Link & UTM Checker
Crawl campaign URLs to detect broken links and malformed UTM (Urchin Tracking Module — the query parameters used to track marketing campaign performance) parameters, then alert a human when problems are found.
When to use
- Before a campaign email or ad set goes live, to confirm every linked URL resolves and is tagged correctly.
- On a recurring monitoring cadence to catch links that broke after launch (redirects removed, pages taken down).
- When a teammate reports a click that landed on a 404 or an analytics dashboard showing missing campaign attribution.
Tools
browser-navigate— load each campaign URL to confirm it resolves and to follow any redirect chain.browser-extract— pull the rendered page state (title, status indicators, final URL) and the outbound link list from a landing page.shell-execute— parse the collected URL list, validate UTM parameter structure (utm_source, utm_medium, utm_campaign present and non-empty), and diff against the expected campaign spec.send-message— alert a human or another agent in-session when broken links or malformed UTMs are found.schedule-task: register this watch on a recurring cron cadence so it reruns automatically without a human re-enqueuing it.
Cadence
Monitoring must repeat, not run once. On first setup, use schedule-task to register a recurring run of this check on an appropriate cron cadence (for example 0 * * * * hourly or 0 9 * * * daily), passing the same monitoring instruction as the schedule prompt. The platform then reruns it automatically at each due time — you never depend on a human to re-enqueue it. Create the schedule only once; if this check is already scheduled, skip re-creating it.
Playbook
- Read the campaign brief or task payload to get the list of URLs and the expected UTM parameter values (source, medium, campaign name).
- Use
shell-executeto normalize the URL list into a working file (dedupe, strip whitespace). - For each URL, call
browser-navigateto load it and follow any redirects. - Call
browser-extractafter navigation to capture the final resolved URL, page title, and any visible error state (404, "page not found", blank page). - Use
shell-executeto compare the final URL's query string against the expected UTM schema: confirm utm_source, utm_medium, and utm_campaign are present, non-empty, and match the approved values for this campaign. - Use
shell-executeto flag any URL that returned a non-200-looking state (based on extracted page signals) or redirected somewhere unexpected. - Use
shell-executeto compile a results table: URL, status (ok/broken/malformed-utm), and details for each failure. - If any URL is broken or has malformed UTMs, use
send-messageto alert a human, listing the specific URLs and the exact problem for each. - If everything passes, use
send-messageto confirm the campaign's links and UTMs are clean, citing the count of URLs checked.
Failure modes
- Navigation blocked or page requires login unexpectedly -> note the URL as unverifiable and flag it via
send-messagerather than guessing its status. - Empty or missing URL list in the task payload -> stop and verify the expected input source with a human before proceeding.
- Rate limited or throttled while crawling many URLs -> back off between requests and note the slowdown for future runs.
- Landing page structure changed so extraction returns nothing useful -> fall back to browser-search to confirm the domain is still live, then report degraded confidence in the result.
Done when
- Every URL in the campaign list has been navigated to and checked against its expected UTM schema.
- A results table exists distinguishing ok, broken, and malformed-utm URLs.
- A human has been alerted via
send-messagewith specifics if any failures were found, or a clean confirmation was sent if none were.