Setting up Easy Monetization for an Flutter app

Enabling Easy Monetization in an app involves integration of monetization libraries and setup of advertising systems.

An app developer should follow these steps:

  1. Integrate the required libraries.
  2. Make changes to the app manifest (Android).
  3. Make changes to Info.plist (iOS).
  4. Implement operations with ads (loading and displaying ads) in the app.
  5. Obtain the user's consent to use their personal data (for countries where the GDPR law is in effect).
  6. Provide access to Firebase.
  7. Publish the app-ads.txt file on your site.

1. Integrate the Yandex Mobile Ads SDK library

Follow these instructions to integrate the library.

2. Make changes to the app manifest (Android)

Add the following lines to the application object in the app manifest:

<manifest>
    <application>
        <meta-data
            android:name="com.google.android.gms.ads.APPLICATION_ID"
            android:value="Google_Application_ID"/>
    </application>
</manifest>

Alert

Replace Google_Application_ID with the value from the “IDs for setup” file.

3. Make changes to Info.plist (iOS)

Add these lines to the app's Info.plist:

<key>GADApplicationIdentifier</key>
<string>Google_Application_ID</string>

<key>SKAdNetworkItems</key>
<array>
    <dict>
        <!-- Yandex Ads -->
        <key>SKAdNetworkIdentifier</key>
        <string>zq492l623r.skadnetwork</string>
    </dict>
    <dict>
        <!-- Google AdMob (ex. AdMob) -->
        <key>SKAdNetworkIdentifier</key>
        <string>cstr6suwn9.skadnetwork</string>
    </dict>
    <dict>
        <!-- VK Ads (ex. myTarget) -->
        <key>SKAdNetworkIdentifier</key>
        <string>n9x2a789qt.skadnetwork</string>
    </dict>
    <dict>
        <!-- VK Ads (ex. myTarget) -->
        <key>SKAdNetworkIdentifier</key>
        <string>r26jy69rpl.skadnetwork</string>
    </dict>
    <dict>
        <!-- Start.io -->
        <key>SKAdNetworkIdentifier</key>
        <string>5l3tpt7t6e.skadnetwork</string>
    </dict>
    <dict>
        <!-- UnityAds -->
        <key>SKAdNetworkIdentifier</key>
        <string>4dzt52r2t5.skadnetwork</string>
    </dict>
    <dict>
        <!-- IronSource -->
        <key>SKAdNetworkIdentifier</key>
        <string>su67r6k2v3.skadnetwork</string>
    </dict>
    <dict>
        <!-- Applovin -->
        <key>SKAdNetworkIdentifier</key>
        <string>ludvb6z3bs.skadnetwork</string>
    </dict>
    <dict>
        <!-- Mintegral -->
        <key>SKAdNetworkIdentifier</key>
        <string>KBD757YWX3.skadnetwork</string>
    </dict>
</array>

Alert

Replace the Google_Application_ID values with the values from the “IDs for setup” file.

4. Implement the logic of ad operations

Make sure to follow the documentation when implementing ad loading and display:

During implementation, use the adUnitId identifiers from the “IDs for setup” file:

  • For interstitial ads, use Interstitial_ad_unit.
  • For rewarded ads, use Rewarded_ad_unit.
  • For banner ads, use Banner_ad_unit.

5. Implement obtaining the user's consent to collect their personal data

Users from EEA member states, where the GDPR is in force, must be shown a personal data collection consent dialog. After you get their consent, make sure to send it to the ad SDK.

See Instructions.

6. Set up Firebase

To increase your revenue from Google Admob, integrate Firebase Analytics following the instructions.

Once enabled, provide access with firebase.admin permissions to int-ad@yandex-team.com emails to link Firebase apps to the Google AdMob (ex. AdMob) account.

Follow the instructions to give Google Analytics access with an Editor role.

After the setup is complete, you can revoke the granted role.

7. Publish the app-ads.txt file

The app-ads.txt file (Authorized Sellers for Apps) is an ad fraud protection mechanism developed by IAB. Though the file is optional, using it will increase both the number of advertisers whose ads can be shown in your app as well as your ad revenue.

Upload app-ads.txt to the root folder of the site listed on your Google Play or App Store developer page.

Make sure to upload the exact app-ads.txt file a link to which is provided in the App_ads_txt line of the “IDs for setup” file.

For more information about the app-ads.txt file, see Monetization.

Contact support