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
Click Add Account
Enter a Name for the account (for example, Agency1) - this name is referenced when configuring an offer
Paste your AppsFlyer agency account API token
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.
Create a new offer → Create and configure an offer
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.
Select correct Leadflow (CPI or CPA)
Leave Private and Requires Approval selected - recommended to prevent publishers from sending direct traffic to the offer.
Approve Publishers
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.
Set offer Status to Pending for now - activate it only once publishers are approved.
Go to the Integrations → AppsFlyer tab and click Add Configuration
Field | Description |
App ID | The AppsFlyer App ID (e.g. |
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
Go to Publishers → (publisher) → Edit → AppsFlyer tab
Enter the Media Source name(s) used by this publisher in AppsFlyer
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 |
| Exact value only |
|
| Anything starting with |
|
| Anything ending with |
|
| 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 |
|
|
Advertising IDs | None |
|
|
AppsFlyer Site ID | None | Populated | Pub. Unique 1 |
AppsFlyer Sub Site ID | None | Populated (empty when AppsFlyer sent none) | Pub. Unique 2 |
Import identifier |
|
| 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 |
|
ℹ️ 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:
API token added and selected on the offer's AppsFlyer configuration
App ID matches exactly what's in AppsFlyer
Media source is mapped to a publisher, and the mapping covers the row's date
Offer targets the row's country and OS
Publisher's Access Status is Approved on the offer
Adv. EventType ID matches the AppsFlyer event name for in-app events
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.













