Skip to main content
HubSpot → AppsFlyerIntegration guide

Connecting HubSpot to AppsFlyer

HubSpot knows which leads turned into money, weeks after the ad platforms have stopped paying attention. AppsFlyer exists because mobile app attribution is a different problem from web attribution, and on iOS a large share of it is now aggregated and delayed by design rather than by accident. The join between them succeeds or fails on one thing: whether the AppsFlyer device identifier, appsflyer_id reaches the HubSpot contact and deal before the conversion happens, because AppsFlyer can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

HubSpot to AppsFlyer: a deal is not an in-app purchase

Your backend must tie a HubSpot deal to a device: write the appsflyer_id to the contact at in-app signup, then post Closed Won as an in-app event to AppsFlyer's server-to-server API with the deal ID as unique reference and the amount. Check every associated contact for the ID, skip deals without app users, and favor cohort reporting.

AppsFlyer attributes installs and in-app events. HubSpot holds deals that a salesperson closes, usually for a team or company, often weeks after one person installed the app. Posting that deal to AppsFlyer only makes sense if you want your app campaigns optimized on sales-assisted revenue, and only if the deal can be tied back to a specific device.

That tie has to be made in your own backend. When a user signs up in the app, write their appsflyer_id to a custom property on the HubSpot contact. When the associated deal reaches Closed Won, post an in-app event to AppsFlyer's server-to-server API with that appsflyer_id, the deal ID as your unique event reference, and the amount. The contact who installed is often not the contact on the deal, so check the deal's associated contacts for one that carries the property.

Expect most deals not to qualify. Buyers who found you on the web, contacts imported from events, and deals with no app user attached have no device behind them; sending those anyway lands them as organic and pushes noise to every network AppsFlyer forwards to. Also, B2B deals close well past the windows ad networks optimize on, so the event is better for cohort reporting in AppsFlyer than for bidding.

HubSpot → AppsFlyer · what breaks

Why this join usually fails — HubSpot → AppsFlyer

  1. 01

    The AppsFlyer device identifier, appsflyer_id never reaches HubSpot

    The identifier has to be captured on the form and written to a contact property. HubSpot forms embedded in an iframe do not automatically see your page's cookies, so a hidden field has to be populated deliberately. Miss that and the contact is created clean, with nothing to join on ever again.

  2. 02

    The deal closes long after the click

    B2B sales cycles routinely run past the attribution window of every ad platform. Value uploaded on day 95 is value nobody will accept, so the timing question has to be answered before anything is built.

  3. 03

    Web conversions sent to a mobile attribution platform

    This is the common error and it produces confident nonsense. A purchase made on your website has no device identifier and no install behind it. AppsFlyer will either discard it or attribute it to nothing, and the revenue disappears somewhere between the two systems without anyone noticing it went.

  4. 04

    Nothing reconciles afterwards

    AppsFlyer shows the event on the raw data export with its attributed media source. Check the raw export, not the aggregate dashboard, and confirm the event carries a device identifier rather than landing as organic.

HubSpot → AppsFlyer · the fix

What working looks like — HubSpot → AppsFlyer

  • The AppsFlyer device identifier, appsflyer_id on every deal

  • Conversions arriving in AppsFlyer

    The event is attributed to the install source, forwarded to whichever networks are configured, and appears in the cohort reporting.

  • Reconciled against the source

HubSpot → AppsFlyer · architecture

How HubSpot and AppsFlyer actually connect

  1. 1

    HubSpot holds the truth

    The deal carries the amount, the stage, the close date and the associated contact. That contact is where the original click identifier must live, because the deal is created much later by a salesperson who has no idea an ad was involved.

  2. 2

    AppsFlyer needs a click to match

    AppsFlyer needs the device identifier and an event name it recognizes, plus the revenue value for in-app purchases. A server event about a user with no linked device cannot be attributed to an install.

  3. 3

    The identifier is the bridge

    The AppsFlyer device identifier, appsflyer_id, captured at the visit and carried into the HubSpot contact and deal.

  4. 4

    The event source decides reliability

    Trigger when the deal reaches Closed Won and send the deal amount with the identifier stored on the associated contact. Sending on form submission instead means you optimize toward form fills, which is exactly the behavior that fills a pipeline with unqualified leads.

  5. 5

    Deduplication at the destination

    AppsFlyer deduplicates in-app events by its own event identifier. Sending the same purchase from both the SDK and your server produces two events and double-counts revenue in every dashboard downstream, including the ad networks AppsFlyer forwards to.

HubSpot → AppsFlyer · normal or broken

Working vs. broken, side by side — HubSpot → AppsFlyer

Normal, not a fault

  • The AppsFlyer device identifier, appsflyer_id present on the deal

  • Sent from a HubSpot workflow or webhook on deal stage change

  • Deduplicated correctly

    AppsFlyer deduplicates in-app events by its own event identifier. Sending the same purchase from both the SDK and your server produces two events and double-counts revenue in every dashboard downstream, including the ad networks AppsFlyer forwards to.

  • Reconciles with the source

Actually broken

  • The AppsFlyer device identifier, appsflyer_id missing on most records

    The identifier has to be captured on the form and written to a contact property. HubSpot forms embedded in an iframe do not automatically see your page's cookies, so a hidden field has to be populated deliberately. Miss that and the contact is created clean, with nothing to join on ever again.

  • Sent from the browser

    B2B sales cycles routinely run past the attribution window of every ad platform. Value uploaded on day 95 is value nobody will accept, so the timing question has to be answered before anything is built.

  • Counted twice, or not at all

    This is the common error and it produces confident nonsense. A purchase made on your website has no device identifier and no install behind it. AppsFlyer will either discard it or attribute it to nothing, and the revenue disappears somewhere between the two systems without anyone noticing it went.

  • Nobody has reconciled it

HubSpot → AppsFlyer · diagnose

Diagnostic order — HubSpot → AppsFlyer

  1. 01

    Count deals carrying the AppsFlyer device identifier, appsflyer_id

  2. 02

    Follow one real conversion end to end

  3. 03

    Open a Closed Won deal and follow it back to its contact

    Does that contact carry the identifier property, populated? Then check the date gap between the contact's creation and the deal's close — that gap decides whether this integration is possible at all.

  4. 04

    Check what share of your revenue happens in the app at all

    If most purchases are on the web, AppsFlyer is not your conversion destination and the work belongs somewhere else entirely.

  5. 05

    Read the match rate, not the success message

    AppsFlyer shows the event on the raw data export with its attributed media source. Check the raw export, not the aggregate dashboard, and confirm the event carries a device identifier rather than landing as organic.

HubSpot → AppsFlyer · prove

How it gets proven — HubSpot → AppsFlyer

Source of truth

HubSpot's Deals report, filtered to Closed Won for the same window, by close date.

  • The AppsFlyer device identifier, appsflyer_id confirmed present on a live deal.
  • In-app revenue events reconciled per transaction against your billing system, with the organic share stated rather than assumed away.
  • The click-to-close time distribution measured, so you know what share of deals close inside the destination's window.

HubSpot → AppsFlyer · free audit

What we check in the free audit

  • Count deals carrying the AppsFlyer device identifier, appsflyer_id
  • Follow one real conversion end to end
  • Open a Closed Won deal and follow it back to its contact
  • Check what share of your revenue happens in the app at all
  • Read the match rate, not the success message

Checked against

HubSpot's Deals report, filtered to Closed Won for the same window, by close date.

Get my free conversion tracking audit

Free30 minutesNo obligation

HubSpot → AppsFlyer · when not to buy

When you don't need this — HubSpot → AppsFlyer

  • Measure identifier coverage yourself first — pull your last hundred deals and count how many carry the AppsFlyer device identifier, appsflyer_id.
  • If your median deal closes well past the destination's upload window, the honest answer is a different measurement strategy, not this integration. We will tell you that on the call rather than sell you a build that cannot work.
  • If you have no mobile app, this is not a destination for you. If you have one but sell mostly on the web, send web conversions to your ad platforms directly and use AppsFlyer only for install and in-app events.

HubSpot → AppsFlyer · what we deliver

What gets built — HubSpot → AppsFlyer

  • Identifier capture into HubSpot

    Create a custom contact property, populate a hidden form field from the persisted first-party cookie, and confirm the property lands on the contact rather than only on the form submission.

  • Event source: a HubSpot workflow or webhook on deal stage change

    Trigger when the deal reaches Closed Won and send the deal amount with the identifier stored on the associated contact. Sending on form submission instead means you optimize toward form fills, which is exactly the behavior that fills a pipeline with unqualified leads.

  • Dispatch to AppsFlyer

    The AppsFlyer server-to-server events API, posted from your billing system with the device identifier and revenue.

  • Reversals where they exist

    A deal reopened or moved out of Closed Won can be retracted where the destination supports it, though most teams accept the small error here rather than wire it.

Written guarantee

95%+ tracking accuracy

Measured against HubSpot's Deals report, filtered to Closed Won for the same window, by close date.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

HubSpot → AppsFlyer questions, answered

Only deals whose contact signed up in your app with the appsflyer_id written to HubSpot. Web-sourced deals have no device to attribute.

Free · 30 min

Get HubSpot and AppsFlyer joined properly

Free30 minutesNo obligation