Connecting Mailgun to Attentive
Mailgun is developer-facing email infrastructure, which means the sending logic lives in your application and the marketing team frequently does not know what is being sent or when. Attentive is SMS, where the identifier is a phone number, the consent rules are legal rather than advisory, and a mistake reaches the customer's pocket within seconds. The join between them succeeds or fails on one thing: whether the subscriber's phone number reaches the Mailgun message before the conversion happens, because Attentive can only match a conversion it can tie back to a click it recognizes.
Free30 minutesNo obligation
Specific to this pair
Mailgun email and Attentive SMS from one trigger, not two
Mailgun keys on email and Attentive on phone, so fire the Attentive event once from your order system, keyed on phone, and treat the Mailgun send as a separate output of that order, not a trigger. Inventory which emails have SMS twins, and never pass consent between them. A hard-bounced order email may justify a transactional text.
Mailgun keys everything on an email address and Attentive keys on a phone number, so there is no join between them unless your application holds both on the customer record. That matters because the same code path that calls Mailgun is often the natural place someone adds an Attentive event. The result is a customer who gets a Mailgun order email and an Attentive text about the same order within the same minute.
Fire the Attentive event from your order system, once, keyed on the subscriber's phone number, and treat the Mailgun send as a separate output of that same order event rather than as a trigger. Before wiring it, run the send inventory on your Mailgun code paths and mark which messages have an SMS twin in Attentive; abandoned cart and shipping updates are the usual collisions.
Do not pass consent between the two. A Mailgun unsubscribe or spam complaint is an email signal and says nothing legally about SMS, and an email address on your Mailgun recipient list is not SMS consent for anyone. The one Mailgun signal worth acting on is a hard bounce on an order email: if Attentive holds a consented number for that customer, a transactional text can reach them when email cannot. Confirm that use fits your Attentive setup and your messaging rules.
Mailgun → Attentive · what breaks
Why this join usually fails — Mailgun → Attentive
- 01
The subscriber's phone number never reaches Mailgun
No session, no click, and the trigger conditions are buried in application code rather than in a campaign tool.
- 02
Nobody able to say why a message was sent
When send logic lives in application code, the marketing team cannot audit it and the engineering team is not thinking about attribution. Messages accumulate, nobody owns the list, and any analysis of email's contribution is unreliable.
- 03
Consent state treated as a tracking detail rather than a legal one
Sending an event is not the same as being allowed to message the person it describes. US SMS marketing is governed by express written consent requirements with statutory damages per message, and "the integration sent it" is not a defence. Consent state has to be checked at send time, in Attentive, not inferred from the fact that an event arrived.
- 04
Nothing reconciles afterwards
Attentive shows the event on the subscriber record and the journey it triggered. Check the subscriber's consent status alongside, because that is the field that decides whether anything should have happened.
Mailgun → Attentive · the fix
What working looks like — Mailgun → Attentive
The subscriber's phone number on every message
Conversions arriving in Attentive
The event lands on the subscriber, triggers the journeys that depend on it, and becomes available for segmentation.
Reconciled against the source
Mailgun → Attentive · architecture
How Mailgun and Attentive actually connect
- 1
Mailgun holds the truth
Because sends are triggered in code, the only reliable description of why a message went out lives in your application, not in Mailgun's logs.
- 2
Attentive needs a click to match
Attentive needs the subscriber's phone number, the event name and its properties. It also needs the subscriber to have consented — an event about someone who never opted in cannot legally be messaged, whatever the event says.
- 3
The identifier is the bridge
The subscriber's phone number, captured at the visit and carried into the Mailgun message.
- 4
The event source decides reliability
Send orders. Use Mailgun events for deliverability monitoring only.
- 5
Deduplication at the destination
Attentive does not deduplicate for you. A purchase sent twice can trigger a journey twice, and the customer receives two texts. Unlike an email, a duplicate SMS costs you money per send and irritates the recipient measurably more.
Mailgun → Attentive · normal or broken
Working vs. broken, side by side — Mailgun → Attentive
Normal, not a fault
The subscriber's phone number present on the message
Sent from your order system
Deduplicated correctly
Attentive does not deduplicate for you. A purchase sent twice can trigger a journey twice, and the customer receives two texts. Unlike an email, a duplicate SMS costs you money per send and irritates the recipient measurably more.
Reconciles with the source
Actually broken
The subscriber's phone number missing on most records
No session, no click, and the trigger conditions are buried in application code rather than in a campaign tool.
Sent from the browser
When send logic lives in application code, the marketing team cannot audit it and the engineering team is not thinking about attribution. Messages accumulate, nobody owns the list, and any analysis of email's contribution is unreliable.
Counted twice, or not at all
Sending an event is not the same as being allowed to message the person it describes. US SMS marketing is governed by express written consent requirements with statutory damages per message, and "the integration sent it" is not a defence. Consent state has to be checked at send time, in Attentive, not inferred from the fact that an event arrived.
Nobody has reconciled it
Mailgun → Attentive · diagnose
Diagnostic order — Mailgun → Attentive
- 01
Count messages carrying the subscriber's phone number
- 02
Follow one real conversion end to end
- 03
Inventory every code path that triggers a send
Usually the first time anyone has, and it frequently finds sends nobody remembers building.
- 04
Verify that events for non-consented customers cannot trigger a send
Check the journey's entry conditions, not the event pipeline. The pipeline will happily deliver an event about someone who never opted in; the journey is what must refuse to act on it.
- 05
Read the match rate, not the success message
Attentive shows the event on the subscriber record and the journey it triggered. Check the subscriber's consent status alongside, because that is the field that decides whether anything should have happened.
Mailgun → Attentive · prove
How it gets proven — Mailgun → Attentive
Source of truth
Your application's own record of what triggered the send, joined to the order.
- The subscriber's phone number confirmed present on a live message.
- Events confirmed on subscriber records with consent state verified, and a test proving a non-consented profile does not trigger a send.
- Orders reconciled against imported conversions, with the send inventory documented.
Mailgun → Attentive · free audit
What we check in the free audit
- Count messages carrying the subscriber's phone number
- Follow one real conversion end to end
- Inventory every code path that triggers a send
- Verify that events for non-consented customers cannot trigger a send
- Read the match rate, not the success message
Checked against
Your application's own record of what triggered the send, joined to the order.
Free30 minutesNo obligation
Mailgun → Attentive · when not to buy
When you don't need this — Mailgun → Attentive
- Measure identifier coverage yourself first — pull your last hundred messages and count how many carry the subscriber's phone number.
- Deliverability monitoring is the right use of Mailgun's data. Attribution belongs at the order.
- If you do not have a consented SMS list, the integration is the least of the work. Building the list compliantly comes first, and no event pipeline substitutes for it.
Mailgun → Attentive · what we deliver
What gets built — Mailgun → Attentive
Identifier capture into Mailgun
Record the trigger reason on the message in your own system and attribute at the order.
Event source: your order system
Send orders. Use Mailgun events for deliverability monitoring only.
Dispatch to Attentive
The Attentive events API, posted server-side from your order system with the subscriber's phone number and the event properties.
Reversals where they exist
Refunds reverse at the order.
Written guarantee
95%+ tracking accuracy
Measured against Your application's own record of what triggered the send, joined to the order.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Mailgun → Attentive questions, answered
Not automatically. Email and SMS consent are separate, so an email unsubscribe does not revoke SMS consent, though you may choose to review those subscribers.
They can, but trigger from the order event in your own system instead, keyed on phone number, so one order does not produce an email and a text from two separate code paths.
Almost always because the subscriber's phone number never reached the Mailgun message. No session, no click, and the trigger conditions are buried in application code rather than in a campaign tool. Measure coverage before debugging the dispatch.
Attentive resolves to a subscriber by phone number. There is no click identifier and no cookie in the messaging channel at all. The phone number is also regulated personal data under US telemarketing rules, which means the identifier itself carries obligations that a gclid does not.
Your order system. Send orders. Use Mailgun events for deliverability monitoring only.
Attentive shows the event on the subscriber record and the journey it triggered. Check the subscriber's consent status alongside, because that is the field that decides whether anything should have happened.
More on Mailgun → Attentive
- Stripe → AttentiveConnecting Stripe to Attentive
- PayPal → AttentiveConnecting PayPal to Attentive
- Shopify → AttentiveConnecting Shopify to Attentive
RELATED GUIDES
Where Mailgun → Attentive fits in the rest of your tracking
- Postmark → AttentiveConnecting Postmark to Attentive
- Resend → AttentiveConnecting Resend to Attentive
- SendGrid → AttentiveConnecting SendGrid to Attentive
- Mailgun → Marketing CloudConnecting Mailgun to Salesforce Marketing Cloud
- Mailgun → KlaviyoConnecting Mailgun to Klaviyo
- EcommerceConversion tracking for ecommerce brands, measured against your orders
Free · 30 min
Get Mailgun and Attentive joined properly
Free30 minutesNo obligation
