Skip to main content

Documentation Index

Fetch the complete documentation index at: https://www.anything.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Ads in Anything
AdMob is for mobile apps. AdSense is for web apps. You connect both with the same Google account but they are tracked as separate connections.

Overview

Ads are the simplest way to make money from a free app. You don’t charge users, you don’t manage subscriptions. Google places ads, users see them, you get paid. Anything supports two Google ad products in one place:
  • AdMob for mobile apps. Banner, interstitial, rewarded, rewarded interstitial, app open, and native ads inside your iOS or Android app. AdMob apps are platform-specific, so iOS and Android each get their own AdMob app and their own ad units.
  • AdSense for web apps. Display, in-article, in-feed, matched content, and link ads on your published web app, plus Auto Ads if you want Google to place them for you. AdSense ad units are global to your account, not scoped to a specific site.
Connect your Google account once in your project settings, pick the ad units you want, and ask the agent to drop them into your app. The agent reads your ad unit IDs from a project secret, so the IDs never get hardcoded into your source.

Prerequisites

Before you begin, make sure you have:
  • A Google account
  • A signed-up AdMob account if you’re monetizing a mobile app
  • A signed-up AdSense account if you’re monetizing a web app
  • A project in Anything: mobile for AdMob, web for AdSense
  • A published app on a domain or in the App Store. Google needs to crawl a real, live property before it serves real ads.
AdMob and AdSense are separate products with separate approval flows. Signing up for one does not sign you up for the other. Sign up for whichever matches the platform you’re monetizing.

Setup

Connect your Google account

1

Open project settings

Open your project, click the settings icon, and go to the Monetization tab. The Monetization tab has two sections: Mobile Payments for in-app purchases and Ads for ad networks.
2

Find the Ads section

Scroll to the Ads section. You’ll see two connect buttons, one for AdMob and one for AdSense.
3

Connect AdMob (for mobile)

Click Connect AdMob. A Google sign-in popup opens. Pick the Google account that owns your AdMob publisher account and approve the read-only access.
4

Connect AdSense (for web)

Click Connect AdSense. Same flow with a different Google scope. Pick the Google account that owns your AdSense publisher account.
The Ads section may not appear in every workspace yet. It’s behind a feature flag during rollout. If you don’t see it, ping support and we’ll enable it for your account.
The OAuth permissions are read-only. Anything fetches your apps and ad units to show them in the picker. It does not create ad units, change settings, or move money. You always create and manage ad units in the AdMob or AdSense console.

AdMob: pick an app and create ad units

After you connect AdMob, the panel switches to a picker. AdMob apps are platform-specific, so an iOS app and an Android app are two separate AdMob apps even when they’re the same product. If you ship to both stores, create one of each.
1

Select your AdMob account

If you have multiple AdMob accounts, pick the one for this project.
2

Select your app

Pick the AdMob app this project should publish under. If you haven’t created an app in AdMob yet, click Create AdMob app to open the AdMob console in a popup, create the app for the right platform (iOS or Android), and come back. The list refreshes when you return.
3

Create ad units in AdMob

Inside the AdMob console, create ad units under that app. AdMob ad units are scoped to a specific app. Give each one a descriptive name like home_banner, level_complete_interstitial, or extra_lives_rewarded. The agent picks units by name when it places them in your app.
4

Refresh the list in Anything

Click Refresh in the ad units list to pull your new ad units, or just leave the tab and come back. The list refreshes automatically when you focus the tab.

AdSense: register your site and create ad units

AdSense works differently from AdMob. Sites and ad units are separate. You register your site once, and you create ad units that work across any approved site under your account. There is no “pick the site for these ad units” step.
1

Add your site in AdSense

In the AdSense console, add your published web app’s domain as a site. AdSense needs a real, reachable URL it can crawl.
2

Create ad units

Still in the AdSense console, create the ad units you want. Pick the type (display, in-article, in-feed, matched content, or link) and give each one a name. These ad units live at the account level and are not tied to the site you just added.
3

Or turn on Auto Ads

If you don’t want to manage individual ad units, enable Auto Ads for your site. Google decides where ads go.
4

Refresh the list in Anything

Back in Anything, click Refresh to pull the latest ad units. The list refreshes automatically when you focus the tab.

Adding ads to your app

Mobile (AdMob)

In your project settings, find the ad unit you want to use and click Add to App. A small placement modal opens.
1

Pick a page (banner and native only)

For banner and native ad units, the modal asks which page to put the ad on. Pick from your project’s existing pages. For full-screen formats (interstitial, rewarded, rewarded interstitial, app open) this step is skipped, since they aren’t tied to a single page.
2

Describe placement (optional)

Add a short note about where on the page the ad should sit. For example, “show a banner at the bottom of the screen, just above the tab bar.” Skip this for full-screen formats.
3

Confirm

Click Add to App. Anything creates a project secret called EXPO_PUBLIC_ADMOB_<NAME>_AD_UNIT_ID with the live ad unit ID, opens a new chat thread, and pre-fills a prompt that tells the agent which page, which format, and where to put it.
You can also skip the modal and just talk to the agent:
"Add the home_banner ad unit at the top of the home screen"
The agent runs a connectivity check first to confirm AdMob is connected, the app is selected, and your ad units are loaded. It then picks the unit matching your description and integrates it using the project secret.
Re-clicking Add to App on the same ad unit reuses the existing secret rather than creating a duplicate. You can place the same unit on multiple pages without polluting your env.

Web (AdSense)

In your project settings, click Add to App on a configured ad slot, or just ask the agent.
"Add a display ad above the footer of the homepage"
AdSense supports five ad slot types, all of which work the same way once added:
  • Display: the most flexible. Banner-style ads that fit anywhere.
  • In-article: ads designed to sit between paragraphs of long-form content.
  • In-feed: ads styled to match cards in a feed or list view.
  • Matched content: related-article recommendations with optional ads mixed in.
  • Link: small text-link ads.
The agent does three things:
  1. Adds the AdSense loader script to <head> of your root layout.
  2. Creates an <AdUnit /> component that wraps Google’s <ins class="adsbygoogle"> tag with the right data-ad-client and data-ad-slot attributes.
  3. Places the ad where you asked.
If you turned on Auto Ads, the agent only adds the loader script. Google places ads itself.
The agent uses your real publisher ID and ad slot IDs, never test or placeholder IDs. Make sure your AdSense site is approved before testing, otherwise Google will return blank ad spaces.

How it works

Anything plugs into Google’s ad SDKs without any configuration on your side. Mobile:
  1. The agent imports react-native-google-mobile-ads directly in your component files.
  2. The Expo plugin and your AdMob app IDs are injected at build time. You don’t edit app.json.
  3. On a real device or development build, the SDK loads ads from Google.
  4. In Expo Go and the web preview, the ad components render as size-accurate placeholders so your layout still looks right.
Web:
  1. The AdSense loader script is added to the <head> of your root layout.
  2. Each ad unit is rendered as an <ins class="adsbygoogle"> element with your publisher and slot IDs.
  3. The component pushes one entry to window.adsbygoogle per ad on mount, so the ad fills.
  4. AdSense’s crawler verifies your site, and ads start serving once it’s approved.

Going live

Both AdMob and AdSense need to verify that you actually own the website or app before they pay out. This is the IAB authorized-sellers protocol, the same ads.txt standard you may have heard about.

AdMob: app-ads.txt

The first time you add an AdMob ad unit, the agent writes an app-ads.txt file to the public/ folder of your web app in the same project. This is intentional. AdMob crawls the developer website you list in the App Store or Play Store, not the app itself. The file contains a single IAB authorized-sellers line:
google.com, pub-XXXXXXXXXXXXXXXX, DIRECT, f08c47fec0942fa0
pub-XXXXXXXXXXXXXXXX is your AdMob publisher ID, filled in automatically. The file is written once. Adding more ad units later doesn’t rewrite it. To finish setup:
1

Publish your web app

Publish the web app in the same project so app-ads.txt is reachable at https://yourdomain.com/app-ads.txt.
2

Set the developer website in the store listing

In App Store Connect (iOS) or Play Console (Android), set your developer website field to the published web app URL.
3

Wait for AdMob verification

AdMob’s crawler picks up the file within a day or two. Once it verifies, your app-ads.txt status flips to Authorized in the AdMob console.

AdSense: ads.txt and site approval

For web, the agent writes ads.txt to the public/ folder so it’s served at https://yourdomain.com/ads.txt. The site approval step is manual. AdSense doesn’t auto-review new sites, you have to ask:
1

Publish your web app

Publish the web app so ads.txt is reachable at https://yourdomain.com/ads.txt.
2

Request a review in AdSense

From the AdSense settings panel in Anything, click Request a review to deep-link to the AdSense site detail page for your domain. In the AdSense console, request the site review for that domain.
3

Wait for site approval

AdSense reviews your site for content and policy compliance. New sites with thin content or no traffic can take days to weeks. Established sites are faster.
4

Confirm ads.txt is verified

The AdSense console shows the ads.txt status next to your site. It should flip to Authorized within a day of publishing.
AdSense will not serve ads on a site until you manually request a review and it gets approved. If your ad placements look blank after going live, check the site approval status before assuming something is broken.

Testing

Mobile

You cannot test real ads in the web preview or Expo Go. You need a real device or a development build.
  • In the web preview: banner ads render as a small gray placeholder. Interstitial and rewarded load() and show() calls are no-ops.
  • In Expo Go: the package is polyfilled with size-accurate placeholders so the layout doesn’t break, but no real ads load.
  • On a real device: real ads load through the Google Mobile Ads SDK once the app is built natively.
While you’re developing, you can also ask the agent to use AdMob’s test ad unit IDs so you see real ad behavior without risking your account:
"Use the AdMob test interstitial ID for now, I'll switch to my real one before launch"

Web

AdSense ads only serve on approved domains. They will look blank in the preview and on any unapproved domain. To verify your integration works:
  1. Publish the app to a real domain.
  2. Open the site, view source, and confirm the AdSense loader script is in <head>.
  3. Confirm https://yourdomain.com/ads.txt returns the IAB authorized-sellers line.
  4. Wait for AdSense to approve the site, then check that ads start filling.

Policy notes

A few rules from Google that are easy to break by accident:
  • Don’t click your own ads. Even once. AdMob and AdSense detect this and ban accounts. If you need to test the click flow, use Google’s test ad unit IDs.
  • Don’t ask anyone else to click your ads. Same rule.
  • Don’t put more than one ad per page until you understand AdSense’s placement rules. Auto Ads handles this for you.
  • Real-world goods and services on iOS can use AdMob alongside Stripe Connect for marketplace payouts. Apple’s IAP rules don’t apply to physical goods or real-world services. See Apple’s Guideline 3.1.5.

Troubleshooting

”No apps found” in AdMob

You connected AdMob but the app dropdown is empty. Fix: Click Create AdMob app to open the AdMob console in a popup, create your app there, then return to the tab. The app list refreshes automatically when you focus the tab.

Ad units list is empty after creating units

You created ad units in AdMob but they don’t show up in the picker. Fix: Click Refresh in the ad units list. There’s a 5-second cooldown between manual refreshes. The list also refreshes automatically when you tab back from the AdMob console.

Ads show as blank or “ad failed to load”

Ads don’t render even on a published site or real device. Fix: Check these in order:
  1. Site or app approved? AdSense and AdMob both gate real ad serving on account approval. Look at your account status in the Google console.
  2. ads.txt or app-ads.txt verified? Anything writes the file. You still need to publish the web app and wait a day or two for Google’s crawler.
  3. Developer website set? For AdMob, the URL in your App Store or Play Store listing must match where app-ads.txt lives.
  4. Test ad unit IDs left in code? Real ads do not serve from test IDs. Have the agent swap them for your live IDs.
You see a bundler error about react-native-google-mobile-ads. Fix: Don’t try to fix it. The error is from the web bundler, not from a real broken import. The package is polyfilled for the web preview and Expo Go, and resolves to the native module on real device builds. Tell the agent to ignore the error and re-run.

AdSense script appears outside <head>

Ads load late, the layout shifts, or some pages don’t get ads. Fix: Ask the agent to move the AdSense loader script into the root layout’s <head>. Tell it the script must sit there, not inside a page component.
"Move the AdSense loader script into the <head> of the root layout"

Ads worked, then stopped after I updated my app

A working integration suddenly serves blank ads. Fix: Check your AdSense or AdMob console for policy notices. Common causes: a new page violates a policy, or a new domain hasn’t been added to your authorized list. Resolve the notice and ads usually return within hours.

FAQ

No. The Expo plugin and your AdMob app IDs are injected at build time. Don’t manually edit app.json to add react-native-google-mobile-ads to plugins. If you do, EAS builds may fail or duplicate config.
AdMob serves ads inside native iOS and Android apps. AdSense serves ads on websites. Same Google account can own both, but they are separate products with separate sign-ups, separate dashboards, and separate approval flows. They also organize ad units differently: AdMob ad units are scoped to a specific app (and a specific platform), AdSense ad units live at the account level and aren’t tied to any one site.
That’s how AdSense works. Sites and ad units are completely separate inside AdSense. You register sites for approval, and you create ad units that can be placed on any approved site under your account. There’s no per-site ad unit list.
Yes. AdMob apps are platform-specific. If you ship to both stores, create one AdMob app for iOS and one for Android, and create ad units under each. The agent picks the right ad units when integrating.
Yes. Ads and subscriptions are not mutually exclusive. Free users see ads, paid users get an ad-free experience. The agent can wire that logic in if you ask. Just be aware Apple’s IAP rules still apply to digital subscriptions on iOS, so RevenueCat is the right call for mobile.
On purpose. Real Google ads can’t load in the web preview or Expo Go because the SDK isn’t bundled, your domain isn’t approved, and Google’s policy blocks unverified surfaces. The placeholders keep your layout intact while you build. Real ads load on a real device build (mobile) or an approved live domain (web).
Go back to the Monetization tab and click Disconnect in either the AdMob or AdSense section. Connections are tracked separately, so disconnecting one leaves the other in place.
Yes. Each connection is independent. Some publishers run AdMob under one Google account and AdSense under another. Pick whichever account is signed up for the product you’re connecting.

Connections

You can connect AdMob and AdSense to the same Google account or to different ones. They are tracked as separate OAuth connections, so disconnecting AdMob doesn’t disconnect AdSense and vice versa. To swap accounts, click Disconnect in the relevant section and reconnect with a different Google account.
  • Mobile Apps: build a native iOS or Android app
  • Web Apps: build and publish a web app
  • Publish your site: get your web app on a real domain so AdSense can verify
  • Publish to the App Store: get your iOS app live so AdMob can verify
  • RevenueCat: subscriptions and in-app purchases for mobile, an alternative to ads
  • Stripe: subscriptions and one-off payments for web, an alternative to ads