# AdMob Integration

> Banner, interstitial and rewarded ads, the consent rules, and the mistakes that stop ads serving.

- **Applies to:** AppMint and Appwright
- **Source:** the Integration Guide shipped inside the app; this page is generated from it.
- **HTML:** https://freewebtoapk.com/docs/admob-ads

Monetization Setup

### 1. Create AdMob Account

Sign up for a Google AdMob account. You'll need a Google account to get started. AdMob is Google's mobile advertising platform.

[Go to AdMob](https://admob.google.com)

### 2. Add Your App

In AdMob dashboard:

- Click 'Apps' in the sidebar
- Click 'Add App'
- Select 'No' for 'Is your app listed on a supported app store?'
- Enter your app name
- Select 'Android' as platform
- Click 'Add'

### 3. Get App ID

After creating your app:

- Copy the App ID shown (format: ca-app-pub-XXXXXXXXXXXXXXXX~XXXXXXXXXX)
- This is different from your Ad Unit ID
- You'll use this in AndroidManifest.xml

```
App ID format:
ca-app-pub-1234567890123456~1234567890
```

### 4. Create Ad Unit (Banner)

In your AdMob app:

- Click 'Ad units' tab
- Click 'Add ad unit'
- Select 'Banner'
- Enter ad unit name (e.g., 'Main Banner')
- Click 'Create ad unit'
- Copy the Ad Unit ID

```
Banner Ad Unit ID format:
ca-app-pub-1234567890123456/1234567890
```

### 5. Setup in Web2APK Generator _(AppMint only)_

In the generator app:

1. Enable 'Ads' toggle in Step 3
2. Select ad placement (Top or Bottom)
3. Paste your AdMob Banner Ad Unit ID
4. Continue with other settings and generate your APK

```
Ad Unit ID (not App ID):
ca-app-pub-XXXXXXXXXXXXXXXX/YYYYYYYYYY
```

### 5. Setup in Appwright _(Appwright only)_

In the generator app:

1. Enable 'Ads' toggle in Step 3
2. Select ad placement (Top or Bottom)
3. Paste your AdMob Banner Ad Unit ID
4. Continue with other settings and generate your APK

```
Ad Unit ID (not App ID):
ca-app-pub-XXXXXXXXXXXXXXXX/YYYYYYYYYY
```

### 6. Test Ads in Your App

During development, use Google's official test IDs to avoid policy violations. Copy-paste these into the generator:

📋 AdMob App ID:  
ca-app-pub-3940256099942544~3347511713

📋 Banner Ad Unit ID:  
ca-app-pub-3940256099942544/6300978111

📋 Interstitial Ad Unit ID:  
ca-app-pub-3940256099942544/1033173712

📋 Rewarded Ad Unit ID:  
ca-app-pub-3940256099942544/5224354917

📋 Publisher ID:  
pub-3940256099942544

📋 Developer Website:  
https://example.com

These test IDs show real-looking ads without generating revenue or violating policies. Replace with your real IDs for production.

```
Test IDs for Generator:

AdMob App ID:       ca-app-pub-3940256099942544~3347511713
Banner Ad ID:       ca-app-pub-3940256099942544/6300978111
Interstitial ID:    ca-app-pub-3940256099942544/1033173712
Rewarded Ad ID:     ca-app-pub-3940256099942544/5224354917
Publisher ID:       pub-3940256099942544
Developer URL:      https://example.com
```

### 7. Interstitial Ads

Interstitial ads are full-screen ads that cover the entire app interface. Users can close them to return to the app.

📺 How to Enable:

1. Toggle ON 'Enable Interstitial Ad' in Step 3
2. Enter your Interstitial Ad Unit ID (or leave empty for test ads)
3. Choose a trigger mode:

🔄 After Navigations (default):  
The ad shows after every N page navigations. For example, if set to 4, the ad appears after the 4th, 8th, 12th page load, and so on.

📱 App Open:  
The ad shows once immediately after the splash screen, when the app first opens.

⚠️ You can enable either Interstitial OR Rewarded - not both at the same time.

```
Example: Action Count = 4

Page 1 → No ad
Page 2 → No ad
Page 3 → No ad
Page 4 → 📺 Interstitial Ad shown!
Page 5 → No ad
Page 6 → No ad
Page 7 → No ad
Page 8 → 📺 Interstitial Ad shown!
...
```

### 8. Rewarded Ads _(AppMint only)_

Rewarded ads are full-screen video ads that users watch in exchange for a reward. They provide higher revenue than banner or interstitial ads.

🎁 How to Enable:

1. Toggle ON 'Enable Rewarded Ad' in Step 3
2. Enter your Rewarded Ad Unit ID (or leave empty for test ads)
3. Choose a trigger mode:

🔄 After Navigations (default):  
Similar to interstitial - the ad shows after every N page loads. Set the 'Action Count' to control frequency. Default is 4.

📱 App Open:  
The reward video shows once when the app first opens after splash.

💡 What is Action Count?  
The number of page navigations between each ad. Lower = more ads (more revenue but worse UX). Higher = fewer ads (better UX but less revenue). Recommended: 3-5.

⚠️ Google policy: rewarded ads need the user's OK. In After Navigations and App Open modes your app first shows a 'Watch an ad?' prompt with a 'No thanks' button; the ad plays only if they accept. For a 'watch ad to earn' button with no automatic ads, use On Demand.

```
Revenue comparison (approximate):

Banner Ads:       $0.10 - $0.50 per 1000 views
Interstitial Ads: $1 - $5 per 1000 views
Rewarded Ads:     $5 - $15 per 1000 views

Recommended Action Count:
Aggressive:  2-3 (more ads, more revenue)
Balanced:    4-5 (recommended)
Conservative: 6-10 (fewer ads, better UX)
```

### 8. Rewarded Ads _(Appwright only)_

Rewarded ads are full-screen video ads that users watch in exchange for a reward. They provide higher revenue than banner or interstitial ads.

🎁 How to Enable:

1. Toggle ON 'Enable Rewarded Ad' in Step 3
2. Enter your Rewarded Ad Unit ID (or leave empty for test ads)
3. Choose a trigger mode:

🔄 After Navigations (default):  
Similar to interstitial - the ad shows after every N page loads. Set the 'Action Count' to control frequency. Default is 4.

📱 App Open:  
The reward video shows once when the app first opens after splash.

💡 What is Action Count?  
The number of page navigations between each ad. Lower = more ads (more revenue but worse UX). Higher = fewer ads (better UX but less revenue). Recommended: 3-5.

```
Revenue comparison (approximate):

Banner Ads:       $0.10 - $0.50 per 1000 views
Interstitial Ads: $1 - $5 per 1000 views
Rewarded Ads:     $5 - $15 per 1000 views

Recommended Action Count:
Aggressive:  2-3 (more ads, more revenue)
Balanced:    4-5 (recommended)
Conservative: 6-10 (fewer ads, better UX)
```

### 9. Consent & Privacy Policy (Required)

⚠️ AdMob requires a consent mechanism for users in the EEA, UK, Switzerland, and US states.

This is handled automatically by the generated app using Google's User Messaging Platform (UMP). The app will:

- Show a consent dialog to EEA/UK/Switzerland users before displaying ads
- Show an opt-out dialog to users in applicable US states
- Only request ads after consent is obtained

What YOU must do:

1. In AdMob console → Privacy & messaging → Create a European regulations message
2. In AdMob console → Privacy & messaging → Create a US state regulations message
3. Set your Privacy Policy URL in the generator (Step 3 or Step 4)
4. Make sure your privacy policy mentions AdMob advertising

⚠️ Without this setup, AdMob may show a policy warning: 'Consent requirement: No CMP'

[Open AdMob Privacy & messaging](https://admob.google.com)

### 10. Ad Review Process

After publishing your app:

- AdMob will review your app (usually takes 24-48 hours)
- Initially, you'll see test ads
- Once approved, real ads will start showing
- Keep your app content policy-compliant

### 11. Enable Payments

To receive ad revenue:

- Go to 'Payments' in AdMob dashboard
- Add payment method (bank account or other options)
- Verify your address
- Set up tax information
- Payments are made monthly after reaching $100 threshold

### 12. Best Practices

✅ Banner Placement: Bottom banner is less intrusive and has better user experience

✅ Interstitial/Rewarded: Choose one, not both. Rewarded ads earn more but require user engagement

✅ Action Count: Start with 4-5 navigations between ads. Too frequent = bad reviews

✅ Test First: Always test with test ad units during development

✅ Monitor Performance: Check AdMob dashboard regularly for earnings and metrics

⚠️ Don't Click: Never click your own ads - this violates AdMob policy

⚠️ Quality Content: Ensure your app provides value and follows AdMob policies

💡 Pro Tip: Combine Banner (always visible) + Interstitial or Rewarded (periodic) for maximum revenue

### 13. Troubleshooting

Common issues and solutions:

- No ads showing: Check if you're using correct Ad Unit ID (not App ID)
- Test ads work but real ads don't: Wait for AdMob review to complete
- Ad request failed: Verify internet connection and AdMob account status
- Account suspended: Review AdMob policies and appeal if needed

[AdMob Help Center](https://support.google.com/admob)

