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 for more details.

  • Clicks and impressions are still imported once per day from the aggregated report

  • Installs and in-app events are pulled hourly as individual records and processed through the live conversion pipeline - budgets and payouts are applied in near real time

  • Fraud is handled automatically:

    • Blocked installs / events (AppsFlyer Protect360) are imported as rejected conversions, with the AppsFlyer rejection reason attached

    • Post-attribution fraud is imported as a reversal, automatically reversing the original conversion and its payout/budget impact


Reporting

Imported AppsFlyer data appears in the Conversion Report and stats like any other traffic.

Column

Source

Offer / Publisher / Event

Resolved via the mappings above

Pub. Sub ID

AppsFlyer Site ID (near-real-time import only)

Pub. Sub Sub ID

AppsFlyer Sub Site ID (near-real-time import only)


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?