Skip to content
Docs
Documentation/Integrations/Attribution & MMPs
Attribution & MMPs

Meta Conversions API

Send verified App Store and Google Play subscription events to a Meta dataset, so Meta can match them to its ads.

On this page What it doesSet it upReport identifiers from your appEvents sentRules that keep numbers honest

What it does

Meta Conversions API sends events to Meta. It is separate from Meta Ads, which only reads ad spend and campaign reports. Connecting one never connects the other.

Set it up

  1. In Meta Events Manager, link a dataset to your Meta app and generate a Conversions API access token.
  2. In Aplyna, open Integrations → Attribution → Meta Conversions API. Enter the Dataset ID and the token, then save. The connection covers every Apple and Google Play app of the project.
  3. Update your app to report each customer's Meta identifiers (next section).
  4. In the Meta SDK, turn off automatic purchase logging and remove manual purchase, subscribe and trial events. Otherwise purchases are counted twice. Keep the Meta SDK itself.

Saving does not test the token. The card shows Connected only after Meta accepted an event from your current configuration.

Report identifiers from your app

Call setMetaAttribution after consent, again once the iOS tracking prompt is answered, and when the billing user changes. Then flush.

try await aplyna.setMetaAttribution(
    appUserID: billingAppUserID,
    anonymousID: AppEvents.shared.anonymousID, // Meta SDK
    advertisingID: trackingAuthorized
        ? ASIdentifierManager.shared().advertisingIdentifier.uuidString
        : nil)
try await aplyna.flush()
  • The SDK never reads an advertising ID or the IDFV and never shows the tracking prompt. Your app passes the ID it read itself.
  • No IP address, email or phone number is collected or sent.
  • Use the app's own iOS or Android SDK key. Test Store keys are refused.

Events sent

Aplyna event and Meta event (default)
Aplyna eventMeta event (default)
Trial startedStartTrial
Initial purchase, trial converted, renewalSubscribe
Non-subscription purchase with a paid amountPurchase
Cancellation, expiration, billing issue, refundNot sent

The Subscription events table on the setup page lets you rename each Meta event or turn it off.

Rules that keep numbers honest

  • Only verified store events newer than the connection are sent.
  • A purchase waits until exactly one customer is linked to it and that customer has a usable identifier.
  • iPhone events need tracking authorization, unless an Admin turns on sending with the anonymous ID only.
  • Sandbox purchases are sent only to a separate sandbox dataset, never to production.
  • Revenue is never negative, and the App User ID is never sent.