Sub topic 2
Checking Links and Tracking Parameters
Assume you know how to create a campaign, segment, and merge tag in your email platform. Pre-send checks can catch broken URLs, missing tracking values, layout problems, and wrong recipients. They cannot prove that every mailbox will display the message perfectly or that every spam filter will accept it.
Checking links and tracking parameters
Open every link in the rendered message, not only the HTML source. Check that each link:
- Uses HTTPS.
- Leads to the intended page.
- Does not return an error or unexpected redirect.
- Includes the required parameters, such as
utm_campaign. - Works on both desktop and mobile.
A tracking parameter is a name-value pair in a URL that identifies campaign traffic. For example, ?utm_source=email&utm_campaign=spring_sale lets an analytics system attribute visits to the campaign.
This small script checks links in a saved HTML file. Some servers reject HEAD requests, so treat those results as manual checks rather than automatic failures.
import re
import sys
from urllib.parse import parse_qs, urlparse
from urllib.request import Request, urlopen
from urllib.error import HTTPError, URLError
html = open(sys.argv[1], encoding="utf-8").read()
urls = re.findall(r'href="(https?://[^"]+)"', html)
for url in urls:
params = parse_qs(urlparse(url).query)
request = Request(url, method="HEAD", headers={"User-Agent": "link-check"})
try:
with urlopen(request, timeout=10) as response:
status = response.status
except (HTTPError, URLError) as error:
status = getattr(error, "code", str(error))
tracking = "OK" if "utm_campaign" in params else "NO-UTM"
print(status, tracking, url)Checking rendering across clients and devices
Send the campaign to seed addresses representing your important environments: webmail, desktop applications, iOS, and Android. Inspect the message in light and dark mode.
Check wrapping, image size, buttons, spacing, and fallback text when images are blocked. Also confirm that the preheader does not show unwanted text from the first paragraph.
Accessibility checks and the plain-text version
Give meaningful images useful alt text, maintain readable color contrast, and use descriptive link text. Do not communicate essential information through color alone. Test keyboard navigation where your platform supports it.
Review the automatically generated plain-text version. It should preserve the main message, links, calls to action, and unsubscribe instructions in a readable order.
Verifying the audience and segment
Compare the final recipient count with the campaign brief. Confirm the intended segment, exclusions, suppression list, and personalization fields. Send a test to contacts with empty optional fields to verify fallback values.
Use an A/B test when you are comparing controlled variants. Use a staged send when you want to limit exposure and monitor the first delivery results.
Exercise
A link works in your browser but lacks utm_campaign. Is the campaign ready?
Show answer
No. Add or correct the required tracking parameter, then test the complete rendered URL again.