Documentation

Development

User Acquisition

Monetization

Industry

Unity Ads User Acquisition

Advertising Management API

Advertising Statistics API

Open User Acquisition dashboard

Unity Ads User Acquisition

Unity Ads User Acquisition
​
​
Get started
  • Partner integration
Integrate with partners
  • Partner integration guides
    • Adjust
    • Airbridge
    • AppsFlyer
      • Integrate AppsFlyer with Unity
      • Create AppsFlyer attribution links
      • AppsFlyer integration validation
      • AppsFlyer advanced ad metrics and data-sharing reference
    • ByteBrew
    • Singular
    • Tenjin
Learn more
  • Comprehensive integration information
  1. Grow your game
  2. Unity Ads User Acquisition
  3. Partner integration
  4. AppsFlyer integration

Integrate AppsFlyer with Unity

Activate the Unity Ads integration in the AppsFlyer dashboard, enable full data-sharing, map events, and set partner permissions.
Read time 6 minutes
Last updated 9 days ago

Important
The following documentation discusses products or services (“Third-party Products”) not developed, owned, or operated by Unity. This information might be outdated or incomplete and is provided for your convenience. Your use of any Third-party Product is subject to its own terms. Unity makes no warranties regarding these products and isn't liable for any damages or losses arising from their use, including issues related to content, advertising, or materials from Third-party providers.
Set up AppsFlyer as your Mobile Measurement Partner (MMP) for Unity Ads User Acquisition campaigns. Integration includes the following setup tasks:
  • Activate the integration in the AppsFlyer dashboard.
  • Configure general integration settings.
  • Configure attribution settings.
  • Configure post-install event settings.
  • Set partner permissions.
For the most up-to-date AppsFlyer integration information, consult the AppsFlyer Help Center.

Prerequisites

Before setup, ensure you meet the following requirements:
  • Add at least one app in the Unity Ads User Acquisition dashboard.
  • Retrieve your Game ID from the User Acquisition dashboard.
  • Download the latest version of the AppsFlyer SDK.

Integrate Unity Ads with AppsFlyer

Complete the following steps to integrate AppsFlyer with your User Acquisition campaign:

Activate the Unity Ads integration

To activate Unity Ads in the AppsFlyer dashboard, follow these steps:
  1. In the AppsFlyer dashboard, go to Collaborate > Partner Marketplace.
  2. Search for Unity Ads and select Set up integration to open in the Integration tab.
  3. Activate the Activate Partner toggle.
  4. Some advertisers might have an Advanced Privacy toggle in the Integration tab. If your dashboard contains this toggle, ensure that you deactivate it.
Important
If Advanced Privacy is active in your integration setup, AppsFlyer can't share any event data with your campaign.
Deactivate Advanced Privacy

Deactivate Advanced Privacy

Configure general integration settings

To configure your general integration settings, follow these steps in the Integration tab > General settings section:
  1. Activate the Share organic/non-organic indication toggle.
Share organic and non-organic

Share organic and non organic

  1. Enter your Unity Game ID in the Unity Ads Game ID field. To copy your Game ID from the Unity Dashboard, refer to the following steps:

To retrieve your Game ID from the Apps page of the Unity Dashboard, follow these steps:
  1. Go to Apps from the left navigation menu. The provided table lists each of your organization's apps. Following each app name, the dashboard displays the app platform and Game ID.
  2. Select Copy () next to the ID to copy it to your clipboard.
Note
Enter your Game ID exactly as shown in the User Acquisition dashboard. Mismatched Game IDs prevent Unity from receiving events correctly.

Configure attribution settings

To set up attribution for your integration, follow these steps in the Integration tab of your AppsFlyer integration:
1

Set the click-through lookback window

Set the click-through lookback window to 2 Days.
To set the window, follow these steps in the Install attribution section:
  1. Set the Install engaged click-through lookback window to Days.
  2. Using the slider, set the window to 2 Days.
2

Enable view-through attribution

To enable view-through attribution, activate the Install view-through attribution toggle.
3

Set the view-through lookback window

Set the view-through lookback window to 7 Days.
To set the window, follow these steps in the Install attribution section:
  1. Set the Install engaged view-through lookback window to Days.
  2. Using the slider, set the window to 7 Days.
Lookback windows

Lookback windows

4

Share default install postbacks with all sources

Include all of your users in install postbacks.
To set the users for Install events, go to the Default postbacks section and select for users from > All media sources, including organic
All media sources, including organic

All media sources, including organic

Configure data-sharing settings

To set up secondary postbacks for post-install events, follow these steps:
1

Enter your Game ID

Enter your Game ID in the game_id field.
To copy your Game ID from the Unity Dashboard, refer to the following steps:
To retrieve your Game ID from the Apps page of the Unity Dashboard, follow these steps:
  1. Go to Apps from the left navigation menu. The provided table lists each of your organization's apps. Following each app name, the dashboard displays the app platform and Game ID.
  2. Select Copy () next to the ID to copy it to your clipboard.
Note
Enter your Game ID exactly as shown in the User Acquisition dashboard. Mismatched Game IDs prevent Unity from receiving events correctly.
2

Enable post-install event postbacks

Enable post-install event postbacks and set the postback window to Lifetime.
To enable the postbacks and set the window, follow these steps in the Integration tab > In-app event settings section:
  1. Activate the In-app event postbacks toggle.
  2. Set the In-app event postback window to Lifetime.
Lifetime in-app event postbacks

Lifetime in-app event postbacks

3

Map events

Map AppsFlyer post-install events to the correct Unity Ads event name.
You can map any in-app event you set up in the AppsFlyer dashboard. Refer to AppsFlyer's In-app events documentation for a list of AppsFlyer event names.
To map your AppsFlyer events to Unity Ads events, follow these steps in the Integration tab > In-app event postbacks section:
  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 Ads 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 Ads event names:

Event type

Suggested AppsFlyer event

Required Unity Ads 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_name}
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 Ads 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.

Enable ad revenue data-sharing

If you want to send ad revenue data for Return on Ad Spend (ROAS) Ad revenue or Hybrid campaigns, you must enable ad revenue data-sharing in your integration.
To share ad revenue event data with your campaign, follow these steps:
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 retrieve your Game ID from the Apps page of the Unity Dashboard, follow these steps:
  1. Go to Apps from the left navigation menu. The provided table lists each of your organization's apps. Following each app name, the dashboard displays the app platform and Game ID.
  2. Select Copy () next to the ID to copy it 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:

To retrieve your API service account secret key from the Unity Dashboard, follow these steps:
  1. From the left navigation menu, go to API Management.
  2. Select Advertising Public API > Service account.
The API Management page of the User Acquisition dashboard.

Advertising Public API Service account

  1. If you don't have a service account, select + New. If you have a service account already, select it from the table.
  2. In the service account page, go to the Keys section.
  3. Select + Add key to generate a new key.
  4. Select the copy buttons following the Secret key to copy the ID.

Set partner permissions

In the Permissions tab, configure the following permissions settings:
  1. Activate the Toggle Ad Network Permissions toggle to enable all other toggles.
  2. Activate the following toggles:
  • Configure integration
  • Configure in-app event postbacks
  • Access retention report
  • Access aggregate conversions and in-app event data
  • Access aggregate revenue data
  • View validation rules
  • Access Protect360 dashboard and raw data
  • Access ad revenue raw data (UA signals)
For descriptions of each permission, refer to the Permissions tab documentation in the AppsFlyer Help Center.

Copyright © 2026 Unity Technologies
LegalPrivacy PolicyCookiesDocumentation Terms of UseDo Not Sell or Share My Personal InformationYour Privacy Choices (Cookie Settings)

"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S and elsewhere (more info here). Other names or brands are trademarks of their respective owners.

Some pages are machine-translated for convenience, and may contain inaccuracies. In the event of conflicting information, the English version is authoritative.

  • On this page
    • Prerequisites

    • Integrate Unity Ads with AppsFlyer

      • Activate the Unity Ads integration

      • Configure general integration settings

      • Configure attribution settings

      • Configure data-sharing settings

        • Enable ad revenue data-sharing

      • Set partner permissions

  • Additional resources
  • Unity Ads Setup Guide (AppsFlyer Help Center)
  • Permissions Tab (AppsFlyer Help Center)

Report a problem with this page
​
​