Conversion Webhook Email Tracking for AI Email Experiments
Opens and clicks tell you what happened inside the inbox, but conversions tell you what happened in your product. This guide explains how conversion webhook email tracking fits alongside marginal's subject line A/B tests so your AI agent can optimize toward revenue, not just engagement.
Why conversion tracking beats opens and clicks
Open and click rates are noisy proxies. A subject line can win on opens but lose on signups, purchases, or activations. Conversion webhook email tracking is the practice of recording the real outcome — a checkout, a trial start, a booked demo — and attributing it back to the email variant that drove it.
marginal natively measures open and click signals plus within-test lift metrics. To extend that into true conversion attribution, you tag the recipient and variant in your email links, then fire a webhook from your own backend when the conversion completes. That keeps your conversion definition in your control while marginal handles the experiment math.
- Opens are inflated by image proxies and privacy features
- Clicks miss conversions that happen after the click
- Conversion events reflect the metric you actually care about
- Attribution by variant tells you which subject line earned the revenue
How marginal fits into the loop
marginal is a hosted email MCP server that exposes four tools your AI agent can call: generate_variants, launch_test, get_results, and recommend_next. You run a subject line A/B test, marginal manages the sends, and it reports open, click, and lift metrics back to the agent.
Conversion data lives on your side. The pattern is to carry the variant identifier through the email's tracked links into your landing page, then record that identifier alongside the conversion in your own analytics or database. Your conversion webhook becomes the source of truth that you compare against marginal's per-variant engagement results.
- generate_variants — draft multiple subject lines to test
- launch_test — send the managed A/B test with tracking
- get_results — pull open, click, and within-test lift figures
- recommend_next — let the agent decide the follow-up step
A practical attribution pattern
Treat the email variant as a UTM-style parameter that travels with the click. When a recipient converts, your backend already knows which variant they received, so a single webhook call to your analytics stack ties the conversion to the experiment. Join that against marginal's get_results output to see which variant produced the highest downstream conversion rate, not just the highest open rate.
- Embed the variant ID in tracked landing-page links
- Persist that ID with the lead or user record
- Fire your conversion webhook when the goal event fires
- Join conversions to marginal's per-variant results for full-funnel lift
Wiring it into AI agent email marketing
Once conversions flow back, your agent can act on them. In an AI agent email marketing workflow, the agent calls launch_test, waits for engagement data, then folds in your conversion webhook data to choose the next subject line — closing the optimization loop without manual reporting.
marginal works with Cursor, Claude Desktop, Claude Code, Windsurf, Cline, Continue, Zed, and OpenAI Codex. Connect to the endpoint at https://marginal.sh/mcp with a Bearer API key, and the free tier covers 100 experiments per month. See the docs at https://marginal.sh/docs/ for setup and the full tool reference.
- Hosted MCP server — no self-hosted infrastructure to run
- Endpoint: https://marginal.sh/mcp with Bearer auth
- Free tier: 100 experiments per month
- Compatible with major MCP clients out of the box
Get started with marginal
marginal is a hosted email marketing MCP server at marginal.sh. Sign up free, create an API key, and connect https://marginal.sh/mcp from Cursor, Codex, or Claude Desktop.
- 100 experiments/month on the free tier
- Four MCP tools: generate_variants, launch_test, get_results, recommend_next
- Listed in the MCP Registry as sh.marginal/mcp