Skip to main content

Importing Stats from Your AppsFlyer Agency Account to Swaarm

Connect your AppsFlyer agency account to automatically import clicks, impressions, and conversions into Swaarm and assign them to the correct publisher.

Overview

With the AppsFlyer Stats Import, Swaarm pulls your AppsFlyer agency account data on a schedule and maps it to the correct offers, publishers, and events in Swaarm - so your stats, payouts, and budgets stay in sync without any manual export or import.

⚠️ Before you start:

  • All imported stats count towards your usage and are billed → Check Usage

  • If the setup is incomplete (offer, publisher, targeting, etc.), data will not be imported


Setup Checklist

Data is only imported when all of the following are in place. More about each step below.

#

What

Where

1

Organization → Settings → Connections → AppsFlyer → Stats Import

2.1

Offers → (offer) → Edit → Integrations → AppsFlyer

2.2

Offers → (offer) → Edit → Events

2.3

Offers → (offer) → Edit → General

2.4

Offers → (offer) → +Add Publishers

3

Publishers → Appsflyer Mapping

4


Step 1 - Add Your AppsFlyer API Token

Navigation path: Organization → Settings → Connections → AppsFlyer → Stats Import → Add Account

  1. Click Add Account

  2. Enter a Name for the account (for example, Agency1) - this name is referenced when configuring an offer

  3. Paste your AppsFlyer agency account API token

  4. Click Save

ℹ️ You can add multiple AppsFlyer accounts.


Step 2 - Offer Setup

💡 We recommend creating a dedicated offer for AppsFlyer import rather than using an existing one. This keeps imported stats clean and separate from live traffic.

  1. Create a new offer → Create and configure an offer

  2. Set the correct Country and OS targeting - only traffic matching the offer's targeting will be imported

    ℹ️ If you have different payouts per country, create separate offers per country. For example: Offer A = US at $2, Offer B = Germany at $1.50 - even if they're the same campaign in AppsFlyer.

  3. Select correct Leadflow (CPI or CPA)

  4. Leave Private and Requires Approval selected - recommended to prevent publishers from sending direct traffic to the offer.

  5. Approve Publishers

  6. Create Events matching your AppsFlyer in-app events - make sure the Adv. EventType ID matches the AppsFlyer event value exactly (case-sensitive)

    ℹ️ Installs are mapped automatically — no event type needed. In-app events with no matching Adv. EventType ID are skipped.

  7. Set offer Status to Pending for now - activate it only once publishers are approved.

  8. Go to the Integrations → AppsFlyer tab and click Add Configuration

Field

Description

App ID

The AppsFlyer App ID (e.g. com.example.app for Android, id123456789 for iOS)

Accounts

Select the AppsFlyer account added in Step 1

Import Offset

How far back the latest imported day is. Maximum: 30 days.

Retargeting

Enable for re-engagement or retargeting offers (imports re-attribution data)

ℹ️

  • Offers configured for AppsFlyer Stats Import cannot use Budgets or Targeted Payouts.

  • You can attach the same App ID to more than one offer - Swaarm separates them by targeted country and OS.


Step 3 - Map Media Sources to Publishers

This is how Swaarm knows which publisher to attribute each row to. AppsFlyer rows carry a Media Source (pid) - you map media source values to a publisher in Swaarm.

💡 We recommend creating a dedicated publisher for AppsFlyer import - without postbacks or contacts - to keep imported stats clean and separate.

Current Method - Publisher AppsFlyer Tab

  1. Go to Publishers → (publisher) → Edit → AppsFlyer tab

  2. Enter the Media Source name(s) used by this publisher in AppsFlyer

  3. Click Save

ℹ️ A media source can only be assigned to one publisher at a time. If it needs to be reassigned to a different publisher, remove it from the current one first. Data is assigned to whichever publisher holds the media source at the time of import - this is not applied retroactively.

New Method - AppsFlyer Mapping Page - Recommended

Navigation path: Publishers → AppsFlyer Mapping → +Add Mapping

Field

Description

Publisher

The publisher this media source belongs to

Global Mapping

If enabled, applies to every offer for this publisher/media source. If disabled, select a specific offer.

Offer

The offer this mapping applies to (only when Global Mapping is off)

Media Sources

One or more AppsFlyer media source names. Press Enter after each. Wildcards supported. (see the details below)

Start Date

Optional. Inclusive. Leave empty for open start.

End Date

Optional. Exclusive. Leave empty for open end.

Wildcard patterns:

Pattern

Matches

Example

xyz_int

Exact value only

xyz_int

xyz*

Anything starting with xyz

xyz_int, xyz_ua

*_int

Anything ending with _int

abc_int, xyz_int

*

Any value

Everything

ℹ️ Wildcards in the middle of a name (e.g. xy*z) are not supported.

Precedence rules:

  • Offer-specific mappings always win over global mappings

  • Exact matches win over wildcard matches

  • Avoid overlapping mappings for the same offer and media source pointing to different publishers

💡 The per-publisher AppsFlyer tab (current method) still works as a fallback. The AppsFlyer Mapping page takes priority.


Step 4 - Check the setting and go live

  • Countries & OS - only rows matching the offer's targeting are imported

  • Publisher approval - the publisher must be Approved on the offer. Pending, Blocked, or Rejected publishers are not imported.

  • Media sources are assigned to corresponding publishers

  • Offer status - once publishers are approved, set the offer to Active to start importing

  • Events are added to the offer with correct AppsFlyer event values


Import Modes

Standard Import (Aggregated)

The default import mode for all accounts. Swaarm pulls aggregated stats from AppsFlyer on a daily schedule based on the configured Import Offset.

  • Clicks, impressions, and conversions are imported per offer / publisher / event / country / day

  • Use On-demand Import to pull a specific date manually - go to the offer's AppsFlyer configuration, pick a date, and click Run Import

Near-Real-Time Import

ℹ️ Near-Real-Time Import is available for select accounts. When enabled, installs and in-app events are imported hourly as individual records, with fraud handling via AppsFlyer Protect360. Contact Swaarm support team to enable it.

Instead of waiting for the next daily import, Near-Real-Time mode pulls installs and in-app events hourly as individual records and runs them through the live conversion pipeline - so budgets, payouts, and fraud rules apply in near real time.

How it works

Two scheduled jobs run in parallel:

Job

Schedule

What it imports

Clicks & impressions

Once per day

Aggregated report (same as standard mode)

Installs & in-app events

Once per hour

Raw records from AppsFlyer's Pull API

Each hourly pull covers the full current day (midnight to now). Rows already imported are automatically skipped - re-running or overlapping pulls will not create duplicates.

API token requirement

⚠️ Near-Real-Time mode requires a V2 ("new-style") AppsFlyer API token. Offers configured with a legacy token will continue receiving daily clicks and impressions, but no conversions will be imported.

To check your token type or generate a V2 token, go to your AppsFlyer account settings.

Payouts & budgets

This is the key behavioural difference from standard import:

Standard import

Near-Real-Time import

Payout

Fixed at import time from the payout configuration

Resolved by the live conversion pipeline - publisher-specific and event-type payouts apply

Budgets

Not enforced - conversions bypass budget rules

Enforced - once a budget is reached, subsequent conversions are rejected

Optimization rules

Not applied

Applied (duplicate detection, event ordering, etc.)

Practical impact: payout changes take effect immediately for new conversions, and offers that hit their budget cap stop accumulating cost automatically.

Fraud handling (AppsFlyer Protect360)

Near-Real-Time mode imports fraud signals from AppsFlyer and surfaces them as conversion statuses in Swaarm - nothing is silently dropped.

AppsFlyer signal

What happens in Swaarm

Blocked install / event (real-time anti-fraud)

Imported as a conversion in status 'Rejected' with the AppsFlyer block reason in Attr. Partner Rej. Reason field. No payout.

Post-attribution fraud (detected after the fact)

Imported as a Reversal - the original conversion status changes 'Rejected' and its payout is removed. Postback Reversed field:

Reversal attempts are always logged, including cases where the original conversion wasn't found or was already rejected. Check Postback log (Reports -> Postback Log) :

Switching between modes

Switching modes will not duplicate your data. The two modes cover cleanly separated time ranges:

  • Switching to Near-Real-Time: standard mode covers completed days (up to yesterday); hourly raw import starts from today. No overlap.

  • Switching back to standard: the standard import resumes from the same checkpoint and only imports the delta for any days already partially covered.

ℹ️ While Near-Real-Time mode is active, AppsFlyer's 2-day and 7-day restatement windows are disabled. Use the on-demand import to backfill a specific past day if needed.

On-demand import in Near-Real-Time mode

The manual import ('Import AppsFlyer Data' on the offer's AppsFlyer configuration) works in both modes:

  • In standard mode: re-imports the aggregated report for the selected date (delta only).

  • In Near-Real-Time mode: imports clicks and impressions from the aggregated report and pulls all six raw reports for that date - useful for backfilling late attributions or testing without waiting for the next hourly job. Safe to re-run.


Data & reporting

Near-Real-Time conversions carry considerably more data than aggregated ones:

Data

Standard import

Near-Real-Time import

Swaarm report field

Device data

Country and OS only

  • IP,

  • user agent,

  • language,

  • platform,

  • OS version

  • Click User Connection IP; Click User Device UA;

  • Click User Device Language;

  • Click User Device OS;

  • Click User Device OS Version

Advertising IDs

None

  • IDFA,

  • GAID,

  • IDFV,

  • Android ID

  • Click User IDFA

  • Click User GAID

AppsFlyer Site ID

None

Populated

Pub. Unique 1

AppsFlyer Sub Site ID

None

Populated (empty when AppsFlyer sent none)

Pub. Unique 2

Import identifier

__AppsflyerOfferImport

__AppsflyerRealtimeImport

Pub. Sub Sub ID

Revenue

None

Event revenue (USD)

Attr. Partner Aggregated Event Value

Rejection reason

None

AppsFlyer block reason (blocked installs/events)

Attr. Partner Rej. Reason

Reversals

None

Visible

  • Conversion Report - Postback Reversed field

  • Postback Log - Attribution Status - Reversal

ℹ️ All imported traffic is identifiable in stats - standard import rows are tagged __AppsflyerOfferImport, Near-Real-Time rows are tagged __AppsflyerRealtimeImport.


Troubleshooting

Conversions aren't showing up - work through this checklist:

  1. API token added and selected on the offer's AppsFlyer configuration

  2. App ID matches exactly what's in AppsFlyer

  3. Media source is mapped to a publisher, and the mapping covers the row's date

  4. Offer targets the row's country and OS

  5. Publisher's Access Status is Approved on the offer

  6. Adv. EventType ID matches the AppsFlyer event name for in-app events

  7. Allow for the Import Offset - recent days may not be imported yet

The wrong publisher is credited - check for overlapping or too-broad media source patterns. Offer-specific mappings beat global ones; exact matches beat wildcards.

Numbers differ slightly from AppsFlyer - aggregated import respects the Import Offset and de-duplicates re-imported days. Very recent data may still be settling on the AppsFlyer side.


FAQ

- Do I need a separate setup per offer?

You need the App ID on each offer, plus the media source and event mappings. The API token is added once and reused.

- Can two offers share one App ID?

Yes - Swaarm separates them by targeted country and OS.

Are installs imported without an event type?

- Yes - installs map to the offer's default install event automatically.

Will importing the same day twice create duplicates?

- No, the import de-duplicates rows already imported.

Does importing cost anything?

- Yes, imported stats count towards your usage and are billed.

Did this answer your question?