fix(email): drop @TrackLink from per-subscriber CTAs (404 + collapse bug)
Listmonk @TrackLink registers ONE static URL per tracked link and points
every recipient's /link/<uuid> redirect at it. On per-subscriber hrefs
({{ lp_link }}, ?dot=, ?npi=, ?clia=) this is doubly broken:
- the registered links.url was captured before the {{ lp_link }} token
rendered, yielding /order/slug&utm_source=... (first &, no ?) -> 404
- even when valid it collapses every carrier/provider onto the first
subscriber's dot/npi/clia value
Real human clicks are already tracked via Umami campaign-click (bot
filtered), so Listmonk link tracking here is redundant and destructive.
Stripped @TrackLink from per-subscriber CTAs:
- scripts/create_deficiency_source_campaigns.py (_cta, _dot_check_cta)
- data/trucking_campaigns/{ucr,ifta}_*.html
- data/hc_campaigns/*.html (10 templates)
Static CTAs (e.g. CRTC ?code= order link) keep @TrackLink (safe).
Live fix to the 10 broken registered links.url rows applied separately
(first & -> ?), backup in listmonk.pw_links_dkim_fix_bak_20260622.
Docs: new runbook incident section + corrected the disproven
'use @TrackLink on all CTAs' guidance in fmcsa/hc plans.
This commit is contained in:
parent
1e9dcfcfd1
commit
3325259af7
16 changed files with 98 additions and 19 deletions
|
|
@ -128,10 +128,20 @@ def _cta(label):
|
|||
# so the template appends its own params with a leading `&` — correct whether
|
||||
# or not the coupon is on. (Previously this used `?dot=`, which double-`?`d
|
||||
# the URL once the coupon added its own query.)
|
||||
#
|
||||
# NO `@TrackLink` here: Listmonk registers a *single static URL per tracked
|
||||
# link* and points every recipient's /link/<uuid> redirect at it. For a
|
||||
# per-subscriber URL like lp_link that is doubly broken — (1) the registered
|
||||
# URL was captured before the `{{ lp_link }}` token rendered, dropping the
|
||||
# `?dot=` and producing `/order/slug&utm_source=...` (no `?`) which 404s, and
|
||||
# (2) even when valid it collapses EVERY carrier onto the first subscriber's
|
||||
# DOT. Real human clicks are tracked via Umami's `campaign-click` event
|
||||
# (bot-filtered), so Listmonk link tracking is redundant here. Rendering the
|
||||
# link directly gives each carrier their own correct `?dot=` URL, no redirect.
|
||||
return (
|
||||
'<div style="text-align:center;margin:24px 0">'
|
||||
'<a href="{{ .Subscriber.Attribs.lp_link }}'
|
||||
'&utm_source=listmonk&utm_medium=email&utm_campaign=deficiency@TrackLink" '
|
||||
'&utm_source=listmonk&utm_medium=email&utm_campaign=deficiency" '
|
||||
'style="display:inline-block;padding:14px 36px;background:#f97316;color:#fff;'
|
||||
f'font-weight:700;border-radius:8px;text-decoration:none;font-size:16px">{label} →</a></div>'
|
||||
)
|
||||
|
|
@ -149,7 +159,7 @@ def _dot_check_cta():
|
|||
'<p style="font-size:13px;color:#64748b;line-height:1.5;margin:0 0 10px">'
|
||||
'Want to verify everything else on your DOT profile first?</p>'
|
||||
f'<a href="{b.SITE_DOMAIN}/tools/dot-compliance-check?dot={{{{ .Subscriber.Attribs.dot_number }}}}'
|
||||
'&utm_source=listmonk&utm_medium=email&utm_campaign=deficiency_dot_check@TrackLink" '
|
||||
'&utm_source=listmonk&utm_medium=email&utm_campaign=deficiency_dot_check" '
|
||||
'style="display:inline-block;padding:13px 30px;background:#f97316;color:#fff;'
|
||||
'font-weight:700;border-radius:8px;text-decoration:none;font-size:15px">'
|
||||
'Run Free DOT Compliance Check →</a></div>'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue