Ads
four networks, every placement off.
AdMob, AppLovin MAX, Unity Ads and ironSource LevelPlay, as one network or a waterfall per format. Ads are off until you switch them on, and hidden for Pro users and after Remove ads.
01Ads in four steps
- Open the network account(s)Create the app and the ad units for Android and iOS in the network's dashboard.
- Put your ids in the consoleConsole → AdMob ids (or AppLovin MAX, Unity Ads, ironSource LevelPlay ids). Empty units mean no ad of that format in a release build.
- Replace the AdMob app id in the app filesGoogle's test app id sits in
AndroidManifest.xmlandInfo.plist; replace it with yours and rebuild (below). - Switch onConsole → Ads → Show ads, then the placements you want. Run
tool/check_ad_ids.sh --releasebefore the store build.
02Networks and formats
| Network | Formats in this app | Ids the app needs |
|---|---|---|
| Google AdMob | Banner, interstitial, rewarded, native, app open | Android and iOS app id, unit ids |
| AppLovin MAX | Banner, interstitial, rewarded, native, app open | SDK key, unit ids |
| Unity Ads | Banner, interstitial, rewarded | Android and iOS game id, placement ids |
| ironSource LevelPlay | Banner, interstitial, rewarded | Android and iOS app key, ad unit ids |
Each network has its own publisher account, review and payout terms. These docs do not estimate ad income.
04Check it with one command
tool/check_ad_ids.sh # exits 1 if any non-test ad id is hard-coded in app/, admin/ or firebase/
tool/check_ad_ids.sh --release # also fails while the AdMob app id is still Google's test id; run before a store build
Run it from the source/ folder (macOS, Linux, Git Bash or WSL). Expected output is one ok line per check and exit code 0. A store build that keeps Google's test app id serves no real AdMob ads and earns nothing from AdMob.
05Placements
Console → Ads. Every placement is off by default.
| Placement | Default | Notes |
|---|---|---|
| Show ads (master switch) | Off | Nothing shows while this is off. |
| App-open ad | Off | At most once per hour. |
| Banner on the markets, stock and news screens | Off | Three separate switches. |
| Native ad after every n stocks / news items | 0 (off) | 0–100. |
| Interstitial on every n-th stock opened | 0 (off) | 0–50. |
| Seconds between two interstitials (minimum) | 120 | 30–3600; also spaces app-open ads. |
| Rewarded ad unlocks an AI stock report | Off | Capped under AI summaries. |
Pro users and users who bought Remove ads see no ads at all (app/lib/ads/ad_policy.dart).
06One network or a waterfall
- One network (default, AdMob): that network serves every format it supports.
- Waterfall per format: one list per format, one network per line, tried in order until one fills. A network without that format, an unknown name or a repeat is skipped and shown on Status.
applovin
admob
Example waterfall for rewarded: AppLovin MAX first, then AdMob.
07Enter your ids, step by step
- Create the app and ad unitsIn each network's dashboard, once for Android and once for iOS. Where the ids appear: AdMob → Apps → App settings (app id,
ca-app-pub-XXXXXXXXXXXXXXXX~NNNNNNNNNN) and Ad units (unit ids, with/). The other networks show theirs in their own dashboards (SDK key, game id, placement ids, app key). - Paste them in the consoleUnder the network's section. Status warns when a switched-on placement has no id.
- AdMob app id in the native projectReplace Google's test app ids in
AndroidManifest.xmlandInfo.plistwith your own, then rebuild.
When an AdMob unit id is empty and the build is a debug build, the app uses Google's published test units, and Unity Ads runs in test mode. Release builds never use test ids. Never click your own live ads; add your phone as a test device in the network's dashboard instead.
08Consent, ATT and privacy
- Before the first ad request the app runs Google's User Messaging Platform (UMP) consent flow (
app/lib/ads/native_adapters.dart). Create and publish your message in AdMob → Privacy & messaging; without a published message no form is shown. - iOS tracking:
Info.plistcontainsNSUserTrackingUsageDescription("Your data is used to show ads that are more relevant to you.") and one SKAdNetwork id (Google's). Reword the text to match your app and add the SKAdNetwork ids each network you enable asks for. This package does not ship its own App Tracking Transparency prompt code; whether your set-up needs the ATT prompt depends on the networks and settings you use. Read Apple's page on user privacy and data use (App Tracking Transparency) and Google's UMP guidance, and add the prompt if your configuration requires it. - Declare ads and the advertising id in Google Play's Data safety form and in Apple's App Privacy details (Release). The manifest declares the
AD_IDpermission.
09Ads in the example build
The example and web builds draw simulated, labelled placeholders so you can see where each placement sits. The ad SDKs do not run on the web.