Documentation

User Acquisition

AppsFlyer integration validation

Review the AppsFlyer integration rules and how to resolve integration setup warnings in the User Acquisition Dashboard.
Read time 27 minutesLast updated 17 days ago

When you integrate your user acquisition campaign with AppsFlyer, the Unity dashboard validates your integration setup to ensure it's configured correctly. If you don't resolve these integration errors, you can't launch new or paused campaigns, and your live campaigns can suffer serious performance and attribution issues.

Integration validation rules

Refer to the following tabs for lists of the required and recommended integration rules and their associated campaign goals:

Required integration rules

You must adhere to the following rules to set your campaigns live:

Rule

Description

Associated campaign goals

The Game ID in the AppsFlyer integration setup must match the Game ID in the Unity dashboard.
All campaign goals
View-through attribution must be enabled.
All campaign goals
View-through lookback windows must be at least seven days.
All campaign goals
Click-through lookback windows must be at least two days.
All campaign goals
AppsFlyer post-install events must be mapped to the correct Unity event name.
All optimized campaign goals, including the following:
In-app purchase events must be mapped correctly.
  • In-app purchase ROAS
  • Hybrid ROAS
  • Payer CPE
In-app purchase event postbacks must contain both values and revenue.
  • In-app purchase ROAS
  • Hybrid ROAS
  • Payer CPE
Within seven days of launch, campaigns must have one or more in-app purchase event postbacks.
Ad revenue event postbacks must contain both values and revenue.
  • Ad revenue ROAS
  • Hybrid ROAS
Within seven days of launch, campaigns must have one or more Ad Revenue event postbacks.
  • Ad revenue ROAS
  • Hybrid ROAS
Level Complete event postbacks must not include values or revenue.
Session event postbacks must not include values or revenue.
Within two days of launch, the app must have at least one install postback in the past 90 days.
All campaign goals

Required rule resolutions

To meet the required integration rules, refer to the following resolution information.

Game ID

To meet this validation rule, ensure that the Game ID you enter in the AppsFlyer dashboard matches the Game ID in the Unity User Acquisition Dashboard exactly.
To enter your Unity Game ID in the AppsFlyer integration setup, follow these steps:
  1. Go to Collaborate > Partner Marketplace and search for
    Unity Ads
    to open your Unity Ads integration.
  2. In the Integration tab, go to the General settings section.
  3. Enter your Game ID in the Unity Ads Game ID field. To copy your Game ID from the Unity Dashboard, refer to the following steps:

To copy your Game ID from the User Acquisition Dashboard, follow these steps:
  1. Go to Apps from the left navigation menu of the dashboard. The provided table lists each of your organization's apps.
  2. Scroll or search to locate the desired app.
  3. Select Settings () at the end of the app row to open the app details page.
  4. Go to the MMP settings section.
  5. Select copy () next to Game ID to copy the ID to your clipboard.
Unity Ads Game ID

Unity Ads Game ID

View-through attribution

To meet this validation rule, ensure that you enable view-through attribution in your AppsFlyer integration setup.
To enable view-through attribution, follow these steps the AppsFlyer dashboard:
  1. Go to Collaborate > Partner Marketplace and search for
    Unity Ads
    to open your Unity Ads integration.
  2. In the Integration tab, go to the Install attribution section.
  3. Activate the Install view-through attribution toggle.
The install view-through attribution toggle in the AppsFlyer integration setup.

View-through attribution enabled

View-through lookback window

To meet this validation rule, set your view-through lookback window to 7 Days.
To set the view-through lookback window to 7 days, follow these steps in the AppsFlyer dashboard:
  1. Go to Collaborate > Partner Marketplace and search for
    Unity Ads
    to open your Unity Ads integration.
  2. In the Integration tab, go to the Install attribution section.
  3. Activate the Install view-through attribution toggle.
  4. Set the Install engaged view-through lookback window to Days.
  5. Using the slider, set the window to 7 Days.
The install engaged view-through lookback window setting in the AppsFlyer integration setup.

7-day view-through lookback window

Click-through lookback window

To meet this validation rule, set your click-through lookback window to 2 Days.
To set the click-through lookback window to 2 Days, follow these steps in the AppsFlyer dashboard:
  1. Go to Collaborate > Partner Marketplace and search for
    Unity Ads
    to open your Unity Ads integration.
  2. In the Integration tab, go to the Install attribution section.
  3. Set the Install engaged click-through lookback window to Days.
  4. Using the slider, set the window to 2 Days.
The install engaged click-through lookback window setting in the AppsFlyer integration setup.

2-day click-through lookback window

AppsFlyer event mapping

To meet this validation rule, ensure that you map all AppsFlyer events to the correct Unity event name.
To map your AppsFlyer events to Unity events, follow these steps in the AppsFlyer dashboard:
  1. Go to Collaborate > Partner Marketplace and search for
    Unity Ads
    to open your Unity Ads integration.
  2. In the Integration tab, go to the In-app event postbacks section.
  3. Activate the In-app event postbacks toggle.
  4. Map your post-install events to Unity events in the mapped to partner event column as follows:
  • Session events to
    session
  • Level Complete events to
    level_complete
  • Ad Revenue events to
    ad_revenue
  • In-app Purchase events to
    purchase
Refer to the following table for suggested AppsFlyer event names and required Unity event names:

Event type

Suggested AppsFlyer event

Required Unity partner event

Mapping notes

Session
af_app_opened
session
-
Ad revenue
af_ad_revenue
ad_revenue
If your AppsFlyer account supports ad revenue data-sharing, enable ad revenue sharing with the Get ad revenue data toggle in the Ad revenue tab.
Otherwise, don't send ad revenue events. Mapping ad revenue events as other event types can cause campaign optimization to stop working. Refer to the AppsFlyer Ad revenue attribution documentation for details and instructions.
In-app purchase
af_purchase
purchase
Don't map revenue events to purchase events.
Milestone completion
  • af_level_achieved
  • {custom_milestone_event}
level_complete
You must enter
level_complete
in the mapped to partner event field. You can enter custom SDK event names in the AppsFlyer event field.
You must enter the required Unity event name in the mapped to partner event field. You can enter custom SDK event names in the AppsFlyer event field. However, the recommended best practice is to use the Suggested AppsFlyer event names provided here.

In-app purchase event mapping

To meet this validation rule, ensure that you configure in-app purchase events correctly in your AppsFlyer integration setup.
To map your in-app purchase event postbacks, follow these steps in the AppsFlyer dashboard:
  1. Go to Collaborate > Partner Marketplace and search for
    Unity Ads
    to open your Unity Ads integration.
  2. In the Integration tab, go to the In-app event postbacks section.
  3. Activate the In-app event postbacks toggle.
  4. Map your Purchase event row as follows:

AppsFlyer event

mapped to partner event

for users from

including

af_purchase
purchase
All media sources, including organicValues & revenue
The event mapping table in the AppsFlyer integration setup.

Purchase event mapping for In-app Purchase campaigns

In-app purchase event values and revenue

To meet this validation rule, ensure that you include Values & revenue when you map in-app purchase events in your AppsFlyer integration setup.
To configure the included data in your in-app purchase event postbacks, follow these steps in the AppsFlyer dashboard:
  1. Go to Collaborate > Partner Marketplace and search for
    Unity Ads
    to open your Unity Ads integration.
  2. In the Integration tab, go to the In-app event postbacks section.
  3. Activate the In-app event postbacks toggle.
  4. In the including column of the mapping table, select Values & revenue:
The Values & revenue selection in the AppsFlyer event mapping table.

Share Purchase event values and revenue

In-app purchase postbacks

To meet this rule within seven days of launching your campaign, your app must have received one in-app purchase postback in the last 90 days.
Ensure that you map your purchase postbacks correctly and include both values and revenue.
To map your in-app purchase event postbacks, follow these steps in the AppsFlyer dashboard:
  1. Go to Collaborate > Partner Marketplace and search for
    Unity Ads
    to open your Unity Ads integration.
  2. In the Integration tab, go to the In-app event postbacks section.
  3. Activate the In-app event postbacks toggle.
  4. Map your Purchase event row as follows:

AppsFlyer event

mapped to partner event

for users from

including

af_purchase
purchase
All media sources, including organicValues & revenue
The event mapping table in the AppsFlyer integration setup.

Purchase event mapping for In-app Purchase campaigns

Ad revenue event values and revenue

To meet this validation rule, ensure that you include Values & revenue when you map ad revenue events in your AppsFlyer integration setup.
Important
To map Ad revenue events with AppsFlyer, you must first enable ad revenue sharing. Refer to the AppsFlyer Ad revenue attribution documentation for details and instructions.
To configure this data-sharing setting, follow these steps in the AppsFlyer dashboard:
  1. Go to Collaborate > Partner Marketplace and search for
    Unity Ads
    to open your Unity Ads integration.
  2. In the Integration tab, go to the In-app event postbacks section.
  3. Activate the In-app event postbacks toggle.
  4. In the including column of the mapping table, select Values & revenue.
Refer to the following example of correct mapping:

AppsFlyer event

mapped to partner event

for users from

including

af_ad_revenue
ad_revenue
All media sources, including organicValues & revenue
The Values & revenue selection in the AppsFlyer event mapping table.

Share Ad Revenue event values and revenue

Ad revenue postbacks

To meet this rule within seven days of launching your campaign, your app must have received one ad revenue postback in the last 90 days.
Ensure that you enable ad revenue data in your AppsFlyer integration setup.
To share ad revenue event data with your campaign, follow these steps in the AppsFlyer dashboard:
1

Activate ad revenue sharing

To activate ad revenue data-sharing, follow these steps in the AppsFlyer dashboard:
  1. Go to Collaborate > Partner Marketplace and search for
    Unity Ads
    to open your Unity Ads integration.
  2. In the Ad revenue tab, activate the Get ad revenue data toggle.
The Ad revenue tab and Get ad revenue toggle in the AppsFlyer integration setup.

Get ad revenue toggle

2

Configure ad revenue data-sharing

To configure your ad revenue data-sharing settings, follow these steps in the AppsFlyer dashboard:
  1. From the AppsFlyer dashboard side menu, go to Settings > Revenue Settings.
Important
To access the Revenue Settings menu, you need an AppsFlyer ROI360 subscription. Refer to the AppsFlyer Ad revenue attribution documentation for details and instructions.
  1. In the Revenue settings > Ad revenue tab, select New ad revenue integration.
  2. Select Unity Ads from the list of revenue partners.
  3. In the partner configuration, select Impression-level (via SDK) with Device-level (via S2S API) as the report type.
The Impression-level with Device-level option in the AppsFlyer Ad revenue partner configuration.

AppsFlyer Revenue settings configuration

3

Enter your API credentials

To finish your ad revenue data-sharing setup, follow these steps in the AppsFlyer dashboard Revenue Settings:
  1. Enter your Unity Game ID in the App key field. To retrieve your Game ID from the Unity Dashboard, refer to the following steps:

To copy your Game ID from the User Acquisition Dashboard, follow these steps:
  1. Go to Apps from the left navigation menu of the dashboard. The provided table lists each of your organization's apps.
  2. Scroll or search to locate the desired app.
  3. Select Settings () at the end of the app row to open the app details page.
  4. Go to the MMP settings section.
  5. Select copy () next to Game ID to copy the ID to your clipboard.
  1. Enter your Unity API Service account secret key in the Secret key field. To retrieve your secret key from the Unity Dashboard, refer to the following steps:

Note
Only Organization Owners or Organization Managers can create service accounts and secret keys. Refer to User types, roles, and permissions for more information.
To retrieve your Secret key and Key ID from the User Acquisition dashboard, follow these steps:
1

Create or open your service account

To generate API keys, you need a service account. To access your service account, follow these steps:
  1. Go to Settings > API management.
The API management page of the User Acquisition dashboard

API management

  1. In the Stats API v2.0 section, select Service account.
  2. On the Service accounts page, select your account from the table. If you don't have a service account, select + New to create one.
2

Generate keys

To generate a secret key and key ID, follow these steps:
  1. From your service account page, go to the Keys section.
  2. Select + Add key to generate a Key ID and Secret key. You can't view previously-generated keys.
  3. Select the copy buttons following the Key ID and the Secret key to copy both credentials.
Important
The dashboard displays the Secret key only once. Store the Key ID and Secret key together somewhere secure. If you lose the Secret key, you must create a new key.
3

Assign the organization role

A service account with no role assigned can still authenticate, but every request it makes fails with a
403
error and an Invalid Credentials message. You must assign the Advertise Stats API MMP Viewer role to your service account before you use its credentials.
To assign this role, follow these steps from your service account:
  1. In the Organization roles section, select + Manage organization roles.
  2. Open the User Acquisition category and select Advertise Stats API MMP Viewer.
  3. Select Save.

Level Complete events

To meet this validation rule, ensure that you choose No values & no revenue when you map level complete events in your AppsFlyer integration setup.
To configure the included data in your level complete postbacks, follow these steps in the AppsFlyer dashboard:
  1. Go to Collaborate > Partner Marketplace and search for
    Unity Ads
    to open your Unity Ads integration.
  2. In the Integration tab, go to the In-app event postbacks section.
  3. Activate the In-app event postbacks toggle.
  4. In the including column of the mapping table, select No values & no revenue:
Refer to the following example of correct mapping:
Note
You can enter custom SDK event names in the AppsFlyer event field. You must enter
level_complete
in the mapped to partner event field.

AppsFlyer event

mapped to partner event

for users from

including

af_level_achieved
level_complete
All media sources, including organicNo values & no revenue
The No values & no revenue selection in the AppsFlyer event mapping table.

No values or revenue in level complete event postbacks

Session events

To meet this validation rule, ensure that you choose No values & no revenue when you map session events in your AppsFlyer integration setup.
To configure the included data in your session event postbacks, follow these steps in the AppsFlyer dashboard:
  1. Go to Collaborate > Partner Marketplace and search for
    Unity Ads
    to open your Unity Ads integration.
  2. In the Integration tab, go to the In-app event postbacks section.
  3. Activate the In-app event postbacks toggle.
  4. In the
    session
    event row, use the including dropdown to select No values & no revenue:
Refer to the following example of correct mapping:

AppsFlyer event

mapped to partner event

for users from

including

af_app_opened
session
All media sources, including organicNo values & no revenue
The No values & no revenue selection in the AppsFlyer event mapping table.

No values or revenue in session event postbacks

Install postbacks

To meet this rule within two days of launching your campaign, your app must have received one install postback in the last 90 days.
Ensure that you configure your Install attribution and Default postbacks settings correctly so your campaigns can receive install postbacks:
  • Activate the Share organic/non-organic indication toggle.
  • Set the click-through lookback window to 2 days.
  • Set the view-through lookback window to 7 days.
  • Activate the Install view-through attribution toggle.
  • Select for users from > All Media sources in the install event Default postbacks setup.
To activate the Share organic/non-organic indication toggle, follow these steps in the AppsFlyer dashboard:
  1. Go to Collaborate > Partner Marketplace and search for
    Unity Ads
    to open your Unity Ads integration.
  2. In the Integration tab, go to the General settings section.
  3. Activate the Share organic/non-organic indication toggle.
Share organice and non-organic

Share organic and non-organic

To meet the recommended integration rules, refer to the following resolution information.

Unattributed and organic installs

To meet this recommended integration rule, ensure you configure the following sections correctly in your AppsFlyer integration:
  • General settings: Activate the Share organic/non-organic indication toggle.
  • Default postbacks: Use the for users from dropdown to select All media sources, including organic.
To configure your install postbacks to include all sources, including organic, follow these steps in the AppsFlyer dashboard:
  1. Go to Collaborate > Partner Marketplace and search for
    Unity Ads
    to open your Unity Ads integration.
  2. In the Integration tab, go to the Default postbacks section.
  3. In the Install event row, use the for users from dropdown to select All media sources, including organic.
All installs, including organic

All installs, including organic

Unattributed and organic in-app purchase events

To meet this recommended integration rule, ensure that you send in-app purchase event postbacks for users from All media sources, including organic.
To send in-app purchase event postbacks for users from all sources, including organic, follow these steps in the AppsFlyer dashboard:
  1. Go to Collaborate > Partner Marketplace and search for
    Unity Ads
    to open your Unity Ads integration.
  2. In the Integration tab, go to the In-app event postbacks section.
  3. In the row for
    purchase
    events, use the for users from dropdown to select All media sources, including organic
All media sources, including organic

All media sources, including organic

Unattributed and organic ad revenue events

To meet this recommended integration rule, ensure that you send ad revenue event postbacks for users from All media sources, including organic.
To send ad revenue event postbacks for users from all sources, including organic, follow these steps in the AppsFlyer dashboard:
  1. Go to Collaborate > Partner Marketplace and search for
    Unity Ads
    to open your Unity Ads integration.
  2. In the Integration tab, go to the In-app event postbacks section.
  3. In the row for
    ad_revenue
    events, use the for users from dropdown to select All media sources, including organic
All media sources, including organic

All media sources, including organic

Unattributed and organic session events

To meet this recommended integration rule, ensure that you send session event postbacks for users from All media sources, including organic.
To send session event postbacks for users from all sources, including organic, follow these steps in the AppsFlyer dashboard:
  1. Go to Collaborate > Partner Marketplace and search for
    Unity Ads
    to open your Unity Ads integration.
  2. In the Integration tab, go to the In-app event postbacks section.
  3. In the row for
    session
    events, use the for users from dropdown to select All media sources, including organic
All media sources, including organic

All media sources, including organic

Unattributed and organic level complete events

To meet this recommended integration rule, ensure that you send level complete event postbacks for users from All media sources, including organic.
To send level complete event postbacks for users from all sources, including organic, follow these steps in the AppsFlyer dashboard:
  1. Go to Collaborate > Partner Marketplace and search for
    Unity Ads
    to open your Unity Ads integration.
  2. In the Integration tab, go to the In-app event postbacks section.
  3. In the row for
    level_complete
    events, use the for users from dropdown to select All media sources, including organic
All media sources, including organic

All media sources, including organic

Lifetime postback windows

To meet this validation rule with AppsFlyer, set your In-app event postback window to Lifetime.
To set the postback window length to lifetime, follow these steps in the AppsFlyer dashboard:
  1. Go to Collaborate > Partner Marketplace and search for
    Unity Ads
    to open your Unity Ads integration.
  2. In the Integration tab, go to the In-app event postbacks section.
  3. Activate the In-app event postbacks toggle.
  4. Set the In-app event postback window to lifetime.
The in-app event postback window setting in the AppsFlyer integration setup.

Lifetime postback window