Campaign Link Checker: UTM tags, redirects and dead links avatar

Campaign Link Checker: UTM tags, redirects and dead links

Pricing

from $0.90 / 1,000 link checkeds

Go to Apify Store
Campaign Link Checker: UTM tags, redirects and dead links

Campaign Link Checker: UTM tags, redirects and dead links

Paste an email's HTML before you send it. The actor requests each link and reports dead links, long redirect chains, missing UTM tags, http links and image links with no alt text. Unsubscribe, mailto, phone and merge token links are listed but not requested.

Pricing

from $0.90 / 1,000 link checkeds

Rating

0.0

(0)

Developer

Ed Rayyis

Ed Rayyis

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Features

Limited permissions

Share

Paste the HTML of an email, or give it the address of a web page, and the actor lists every link in it. It sends a request to each web link's address, follows any redirects one hop at a time, and reads the status code the server answers with, so you see which links end on an error page instead of the page you meant. It also flags each link that's missing one of the UTM parameters, the utm_source, utm_medium and utm_campaign tags at the end of an address that your campaign reports read. Unsubscribe and preference links, mailto: and tel: links, and links holding a merge token are listed and never requested.

Use it for

You're about to send a campaign email. Paste its HTML and read the rows marked broken first: each one shows the status the server answered and every hop on the way there. Then look for links flagged with missing UTM parameters. A link without them sends the visitor to your site with no campaign tags on the address.

After someone edits a template, run an email built from it and check the UTM flags again. Once a landing page or the web version of an email is live, give the actor its address instead, and it checks the links on the page as the server sends it.

Sample

Input, an email with four links:

{
"html": "<html><body><p><a href=\"https://example.com/?utm_source=newsletter&utm_medium=email&utm_campaign=spring\">Read the guide</a></p><p><a href=\"https://example.com/pricing\">See pricing</a></p><p><a href=\"https://example.com/missing-page?utm_source=newsletter&utm_medium=email&utm_campaign=spring\">Old offer</a></p><p><a href=\"https://example.com/unsubscribe\">Unsubscribe</a></p></body></html>"
}

The run returned four link rows and one summary row. The pricing link answers 404 and carries none of the three UTM parameters. The old offer link answers 404 but has its UTM tags. The unsubscribe link is listed and not requested. Two of the rows, trimmed to the fields that matter here:

[
{ "url": "https://example.com/pricing", "anchorText": "See pricing", "status": 404, "category": "clientError", "broken": true,
"issues": ["answers 404", "missing UTM parameters: utm_source, utm_medium, utm_campaign"] },
{ "url": "https://example.com/unsubscribe", "anchorText": "Unsubscribe",
"notes": ["matches a no request pattern, so it was listed and not requested"] }
]

The summary row: linksFound 4, uniqueLinks 4, requested 3, broken 2, missingUtm 1, withIssues 2.

What it checks

Each unique link gets one row, with the number of times it appears and every anchor text used for it.

  • A link is marked broken when the last answer is a 4xx or 5xx status other than 401, 403 and 429, when a redirect gives no destination, when the redirects loop back or run past the maximum, or when the request fails outright: the host name doesn't resolve, the certificate fails, the connection fails, or the address can't be read as a URL. A 401, 403 or 429 isn't marked broken, because a bot filter can answer that way for a link that works in a browser. A timeout isn't marked broken either. Either way, the row notes what came back.
  • The row lists every redirect hop with its status. A chain of 3 hops or more is flagged, since each hop is one more request the reader's browser makes before the page opens. You can change that number.
  • Every web link must carry each required UTM parameter with a value. The default list is utm_source, utm_medium and utm_campaign, and names match whatever their capital letters. Links that match your UTM skip patterns aren't checked for them.
  • Links that use http instead of https, links with an empty or placeholder href such as #, javascript: links, links with no anchor text and image links whose image has no alt text are flagged. So is a relative link (one written without its domain) when you gave no base URL, since the actor can't tell which site it points to.
  • A link holding a merge token such as {{lead.First Name}} or [[name]], and a mailto: or tel: link, are listed and not requested. So is a link that matches a no request pattern. By default, both the no request patterns and the UTM skip patterns match any address containing unsubscribe, opt-out, optout, opt_out or preference, so the actor never opens a subscriber's unsubscribe or preference page.

Input

  • Email HTML, or page URLs, or both (at least one)
  • Base URL for relative links in the HTML
  • Required UTM parameters (default utm_source, utm_medium, utm_campaign). An empty list turns the UTM check off.
  • No UTM check for links matching: regular expressions
  • Do not request links matching: regular expressions
  • Flag redirect chains of at least (default 3 hops), maximum redirects to follow (default 10)
  • Maximum links per email or page (default 300), links checked at once (default 10), timeout per request (default 20 seconds)

Output

One dataset row per unique link (type: link) and one summary row per email or page (type: summary).

A link row holds url, kind (web, mailto, tel, placeholder, script, token or relative), anchorText, anchors, element, occurrences, status, category, broken, finalUrl, redirectCount, redirectChain, responseTimeMs, utm (the UTM parameters found), issues, issueCount, notes and error.

The category is one of ok, redirected, clientError, serverError, forbidden, rateLimited, timeout, redirectError, redirectLoop, dnsError, tlsError, connectionError or invalidUrl.

The summary row holds linksFound, uniqueLinks, requested, broken, missingUtm, httpLinks, longRedirectChains and withIssues. A page that can't be read gets a summary row with ok: false and an error.

Pricing

Pay per event: one event for each link requested. Links that are listed and not requested are not charged. The run stops when it reaches the maximum charge you set.

Scope and conduct

For each link it checks, the actor sends one GET request, plus one more for every redirect hop. It reads the status and headers and closes the connection without reading the rest of the answer. A page you give by its address is downloaded in full, so its links can be read. The actor doesn't log in, fill in forms or collect personal data. It uses no proxies. Check links you're allowed to check.

From the same account, for checking a website:

Support

Questions and problems: the Issues tab on this page.