Skip to main content
Mailgun → LinkedInIntegration guide

Connecting Mailgun to LinkedIn Ads

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. LinkedIn is where B2B advertisers pay the highest cost per click in the industry, which makes an unmeasured conversion more expensive here than almost anywhere. The join between them succeeds or fails on one thing: whether the li_fat_id click identifier reaches the Mailgun message before the conversion happens, because LinkedIn can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

Mailgun to LinkedIn: no event to send, but a B2B list to use

Nothing in Mailgun belongs in LinkedIn's Conversions API; send trial starts, demos or closed deals from your application or CRM with the landing li_fat_id. Mailgun's active-user recipients can become a hashed matched audience excluding current customers from acquisition, if your privacy notice allows. Record Mailgun triggers on upgrades to see LinkedIn credit following lifecycle emails.

There is nothing in Mailgun for the LinkedIn Conversions API. A message delivery is not a conversion, and a click in an email carries no li_fat_id. For a B2B SaaS sending product mail through Mailgun, the conversion LinkedIn should see is the trial start, demo booking or closed deal from your application or CRM, sent with the li_fat_id captured on the landing page.

Where Mailgun data does touch LinkedIn is audiences. Your application's recipient list of active trial users and customers can be uploaded as a LinkedIn matched audience to exclude from acquisition campaigns, so you stop paying LinkedIn click prices to reach people already in the product. Check that your privacy notice covers that use, and upload hashed emails where the upload method supports it.

Watch one attribution trap. A trial user who gets a Mailgun "trial ending" email and then upgrades may also have clicked a LinkedIn ad weeks earlier, and LinkedIn will claim the upgrade if it falls inside the window. Record the Mailgun trigger on the upgrade in your own data, so you can see how many LinkedIn-credited conversions followed a lifecycle message rather than the ad.

Mailgun → LinkedIn · what breaks

Why this join usually fails — Mailgun → LinkedIn

  1. 01

    The li_fat_id click identifier never reaches Mailgun

    No session, no click, and the trigger conditions are buried in application code rather than in a campaign tool.

  2. 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.

  3. 03

    Long B2B cycles against LinkedIn's windows

    LinkedIn's attribution windows are configurable and finite, while B2B deals close in quarters. A conversion that matters commercially frequently falls outside the window that LinkedIn will credit, and that gap has to be reported rather than argued about.

  4. 04

    Nothing reconciles afterwards

    Campaign Manager reports conversions against each defined conversion action with its own window. A successful API call is not a matched conversion — reconcile LinkedIn's reported conversions against your CRM for the same window, and expect a gap wherever your sales cycle exceeds the attribution setting.

Mailgun → LinkedIn · the fix

What working looks like — Mailgun → LinkedIn

  • The li_fat_id click identifier on every message

  • Conversions arriving in LinkedIn

    Conversions appear in Campaign Manager against the campaign, with the value you sent, and feed LinkedIn's optimization and its company-level reporting.

  • Reconciled against the source

Mailgun → LinkedIn · architecture

How Mailgun and LinkedIn actually connect

  1. 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. 2

    LinkedIn Ads needs a click to match

    LinkedIn matches server events on the click identifier where present and hashed user data otherwise. Conversions have to be defined in Campaign Manager before anything can be sent against them, and the definition includes the attribution window and counting rule.

  3. 3

    The identifier is the bridge

    The li_fat_id click identifier, captured at the visit and carried into the Mailgun message.

  4. 4

    The event source decides reliability

    Send orders. Use Mailgun events for deliverability monitoring only.

  5. 5

    Deduplication at the destination

    LinkedIn deduplicates on an event identifier shared between the Insight Tag and the Conversions API. Running both without pairing them doubles every conversion, which on LinkedIn's cost per click is an expensive error to leave running.

Mailgun → LinkedIn · normal or broken

Working vs. broken, side by side — Mailgun → LinkedIn

Normal, not a fault

  • The li_fat_id click identifier present on the message

  • Sent from your order system

  • Deduplicated correctly

    LinkedIn deduplicates on an event identifier shared between the Insight Tag and the Conversions API. Running both without pairing them doubles every conversion, which on LinkedIn's cost per click is an expensive error to leave running.

  • Reconciles with the source

Actually broken

  • The li_fat_id click identifier 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

    LinkedIn's attribution windows are configurable and finite, while B2B deals close in quarters. A conversion that matters commercially frequently falls outside the window that LinkedIn will credit, and that gap has to be reported rather than argued about.

  • Nobody has reconciled it

Mailgun → LinkedIn · diagnose

Diagnostic order — Mailgun → LinkedIn

  1. 01

    Count messages carrying the li_fat_id click identifier

  2. 02

    Follow one real conversion end to end

  3. 03

    Inventory every code path that triggers a send

    Usually the first time anyone has, and it frequently finds sends nobody remembers building.

  4. 04

    Confirm auto-tagging is on and the conversion is defined in Campaign Manager

    Two settings, both easy to miss, and either one missing means nothing matches.

  5. 05

    Read the match rate, not the success message

    Campaign Manager reports conversions against each defined conversion action with its own window. A successful API call is not a matched conversion — reconcile LinkedIn's reported conversions against your CRM for the same window, and expect a gap wherever your sales cycle exceeds the attribution setting.

Mailgun → LinkedIn · prove

How it gets proven — Mailgun → LinkedIn

Source of truth

Your application's own record of what triggered the send, joined to the order.

  • The li_fat_id click identifier confirmed present on a live message.
  • Auto-tagging confirmed enabled, the conversion defined in Campaign Manager, and deduplication verified on a real conversion.
  • Orders reconciled against imported conversions, with the send inventory documented.

Mailgun → LinkedIn · free audit

What we check in the free audit

  • Count messages carrying the li_fat_id click identifier
  • Follow one real conversion end to end
  • Inventory every code path that triggers a send
  • Confirm auto-tagging is on and the conversion is defined in Campaign Manager
  • Read the match rate, not the success message

Checked against

Your application's own record of what triggered the send, joined to the order.

Get my free conversion tracking audit

Free30 minutesNo obligation

Mailgun → LinkedIn · when not to buy

When you don't need this — Mailgun → LinkedIn

  • Measure identifier coverage yourself first — pull your last hundred messages and count how many carry the li_fat_id click identifier.
  • Deliverability monitoring is the right use of Mailgun's data. Attribution belongs at the order.
  • If you are not selling to businesses, LinkedIn's cost per click is very hard to justify and no measurement work changes that arithmetic.

Mailgun → LinkedIn · what we deliver

What gets built — Mailgun → LinkedIn

  • 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 LinkedIn

    Server events to the LinkedIn Conversions API with the click identifier, hashed user data and a matched event identifier.

  • 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.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Mailgun → LinkedIn questions, answered

No. Email clicks carry no LinkedIn click ID; send the downstream conversion from your app or CRM instead.

Free · 30 min

Get Mailgun and LinkedIn joined properly

Free30 minutesNo obligation