email trust signals: add data-safety + guarantee + social-proof strip to HC, telecom (campaign_template), and trucking (6 source + active campaigns via injector). Vertical accents: teal/blue/orange

This commit is contained in:
justin 2026-06-06 04:13:16 -05:00
parent 95698852ce
commit 53ec011198
8 changed files with 196 additions and 10 deletions

View file

@ -192,6 +192,23 @@ def render(seg_key: str, *, test: bool = False) -> tuple[str, str]:
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="margin:18px 0;"><tr><td style="background:#f0f4f8;border-radius:8px;padding:16px;font-size:13px;color:#374151;line-height:1.6;">
<strong>Questions?</strong> Reply to this email or call <strong>{PHONE}</strong>. Performance West is a dedicated healthcare compliance firm &mdash; we handle the CMS/NPPES paperwork so you can focus on patients.
</td></tr></table>
<!-- Trust signals (data-safety + guarantee relevant when sharing NPI/PECOS info) -->
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="margin:20px 0 6px;border-top:1px solid #e5e7eb;padding-top:14px;">
<tr>
<td align="center" style="padding:10px 4px;font-family:Inter,system-ui,sans-serif;">
<span style="display:inline-block;margin:0 8px;font-size:11px;font-weight:600;color:#0f766e;">&#128737;&#65039; SOC 2 Type II hosting</span>
<span style="display:inline-block;margin:0 8px;font-size:11px;font-weight:600;color:#0f766e;">&#9989; HIPAA &amp; PCI compliant</span>
<span style="display:inline-block;margin:0 8px;font-size:11px;font-weight:600;color:#0f766e;">&#128274; 256-bit TLS encrypted</span>
<span style="display:inline-block;margin:0 8px;font-size:11px;font-weight:600;color:#0f766e;">&#128179; Secure payment by Stripe</span>
</td>
</tr>
<tr>
<td align="center" style="padding:4px;font-family:Inter,system-ui,sans-serif;font-size:12px;color:#4b5563;">
<strong style="color:#047857;">100% satisfaction guarantee</strong> &middot; fixed pricing, no billable hours &middot; trusted by providers nationwide
</td>
</tr>
</table>
</td></tr>
<!-- Footer -->

View file

@ -55,6 +55,19 @@
<strong>Need help?</strong> Reply to this email or call us at <strong>(888) 411-0383</strong>. We offer a <strong>free compliance assessment</strong> for all FCC-registered carriers.
</td></tr></table>
<!-- pw-trust-strip-v1 : data-safety + guarantee + social proof -->
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="margin:18px 0 4px;border-top:1px solid #e5e7eb;padding-top:14px;">
<tr><td align="center" style="padding:8px 4px;font-family:Inter,sans-serif;">
<span style="display:inline-block;margin:0 7px;font-size:11px;font-weight:600;color:#1d4ed8;">&#128737;&#65039; SOC 2 Type II hosting</span>
<span style="display:inline-block;margin:0 7px;font-size:11px;font-weight:600;color:#1d4ed8;">&#128274; 256-bit TLS encrypted</span>
<span style="display:inline-block;margin:0 7px;font-size:11px;font-weight:600;color:#1d4ed8;">&#128179; Secure payment by Stripe</span>
<span style="display:inline-block;margin:0 7px;font-size:11px;font-weight:600;color:#1d4ed8;">&#9989; SSL Labs A+ rated</span>
</td></tr>
<tr><td align="center" style="padding:2px 4px 8px;font-family:Inter,sans-serif;font-size:12px;color:#475569;">
<strong style="color:#1d4ed8;">100% satisfaction guarantee</strong> &middot; fixed pricing, no billable hours &middot; trusted by carriers nationwide
</td></tr>
</table>
</td></tr>
<!-- Footer -->

View file

@ -0,0 +1,76 @@
#!/usr/bin/env python3
"""Inject a trucking-appropriate trust strip into the trucking source-template
campaigns in the trucking Listmonk DB (the ones the nightly builder clones).
Idempotent: skips campaigns that already have the strip. Run on the host.
"""
import subprocess, sys
SOURCE_IDS = [271, 272, 273, 274, 309, 310]
MARKER = "pw-trust-strip-v1"
# Trucking trust strip — data-safety + guarantee + social proof. Matches site.
STRIP = (
'<!-- ' + MARKER + ' -->'
'<table role="presentation" width="100%" cellpadding="0" cellspacing="0" '
'style="margin:18px 0 6px;border-top:1px solid #e5e7eb;padding-top:14px">'
'<tr><td align="center" style="padding:8px 4px;font-family:Inter,system-ui,sans-serif">'
'<span style="display:inline-block;margin:0 7px;font-size:11px;font-weight:600;color:#c2410c">&#128737;&#65039; SOC 2 Type II hosting</span>'
'<span style="display:inline-block;margin:0 7px;font-size:11px;font-weight:600;color:#c2410c">&#128274; 256-bit TLS encrypted</span>'
'<span style="display:inline-block;margin:0 7px;font-size:11px;font-weight:600;color:#c2410c">&#128179; Secure payment by Stripe</span>'
'<span style="display:inline-block;margin:0 7px;font-size:11px;font-weight:600;color:#c2410c">&#9989; SSL Labs A+ rated</span>'
'</td></tr>'
'<tr><td align="center" style="padding:2px 4px 8px;font-family:Inter,system-ui,sans-serif;font-size:12px;color:#475569">'
'<strong style="color:#c2410c">100% satisfaction guarantee</strong> &middot; fixed pricing, no billable hours &middot; trusted by thousands of carriers nationwide'
'</td></tr></table>'
)
def psql(sql, fetch=False):
cmd = ["docker", "exec", "-i", "performancewest-api-postgres-1",
"psql", "-U", "pw", "-d", "listmonk", "-tAc", sql]
r = subprocess.run(["sudo"] + cmd, capture_output=True, text=True)
if r.returncode != 0:
print("PSQL ERR:", r.stderr[:200]); sys.exit(1)
return r.stdout.strip()
def set_body(cid, body):
# write body via a file to avoid shell-escaping a huge HTML blob
import tempfile, os
with tempfile.NamedTemporaryFile("w", suffix=".sql", delete=False) as f:
# use dollar-quoting
f.write(f"UPDATE campaigns SET body = $PWBODY${body}$PWBODY$ WHERE id = {cid};")
path = f.name
subprocess.run(["sudo", "docker", "cp", path, "performancewest-api-postgres-1:/tmp/u.sql"], check=True)
r = subprocess.run(["sudo", "docker", "exec", "performancewest-api-postgres-1",
"psql", "-U", "pw", "-d", "listmonk", "-f", "/tmp/u.sql"],
capture_output=True, text=True)
os.unlink(path)
return "UPDATE 1" in r.stdout
def main():
for cid in SOURCE_IDS:
body = psql(f"select body from campaigns where id={cid};")
if not body:
print(f" {cid}: NOT FOUND, skip"); continue
if MARKER in body:
print(f" {cid}: already has trust strip, skip"); continue
# Inject right before the final footer block. Anchor: the
# '<div style="text-align:center;padding:16px;font-size:11px' footer line,
# else before the last </div></div> close.
anchor = '<div style="text-align:center;padding:16px;font-size:11px'
if anchor in body:
new = body.replace(anchor, STRIP + anchor, 1)
else:
# fallback: before the very last </div>
idx = body.rfind("</div>")
new = body[:idx] + STRIP + body[idx:] if idx != -1 else body + STRIP
if set_body(cid, new):
print(f" {cid}: trust strip injected")
else:
print(f" {cid}: UPDATE failed")
if __name__ == "__main__":
main()