Critical Issues (3):
- •AdSense is not enabled. Set ADSENSE_CONFIG.ENABLED = true
- •10 slot IDs are still using placeholder values
- •AdSense script not found in page
Warnings (1):
- •AdSense meta tag not found
1. Create/Login to AdSense Account
Visit https://adsense.google.com and sign in with your Google account
Open AdSense2. Add Your Site
Add your website URL to AdSense and wait for approval (can take 1-2 weeks)
- Go to Sites → Add Site
- Enter your domain (not localhost)
- Verify site ownership (meta tag already added)
- Wait for approval email
3. Create Ad Units
Create ad units in AdSense dashboard for each ad placement
- Go to Ads → By ad unit → Display ads
- Create ad units for:
- • Home Top Banner (728x90 or Responsive)
- • Home Mid Banner (300x250 or Responsive)
- • Article Sidebar (300x250 or Responsive)
- Choose 'Responsive' for best results
- Save and generate code
4. Get Ad Slot IDs
Copy the data-ad-slot values for each ad unit you created
- In each ad unit, find the code snippet
- Look for: data-ad-slot="1234567890"
- Copy the slot ID (just the number)
- Update components/ads/AdSenseConfig.js
5. Update Configuration File
Replace placeholder slot IDs in AdSenseConfig.js with real values
- Open: components/ads/AdSenseConfig.js
- Replace '1234567890' with actual slot IDs
- Set ENABLED: true after approval
- Save and deploy
6. Verify Site Ownership
Add the AdSense verification meta tag to your site
- ✅ Already added in Layout.js
- Meta tag: <meta name="google-adsense-account" content="ca-pub-3548525623363447">
- Verify in AdSense dashboard
7. Test and Deploy
Deploy to production and verify ads are showing
- ⚠️ Ads won't show on localhost
- Deploy to live domain
- Wait 10-20 minutes for ads to appear
- Check browser console for errors
- Use AdSense dashboard to monitor
// components/ads/AdSenseConfig.js
export const ADSENSE_CONFIG = {
CLIENT_ID: 'ca-pub-3548525623363447',
// ⚠️ Set to true after AdSense approval
ENABLED: false, // Change to true
// 🔧 Replace these with your actual slot IDs
SLOTS: {
HOME_TOP_BANNER: '1234567890', // ← Replace
HOME_MID_BANNER: '1234567891', // ← Replace
ARTICLE_SIDEBAR_TOP: '1234567893', // ← Replace
// ... etc
}
};Ads showing blank space
Wait 10-20 minutes after deployment. AdSense needs time to fill ad slots.
Ads not showing at all
Check: (1) Account approved? (2) Slot IDs correct? (3) ENABLED: true? (4) Not on localhost?
Policy violations
Ensure content follows AdSense policies. Religious content is allowed if it's educational and doesn't promote intolerance.
Low ad revenue
Increase traffic, improve ad placements, use responsive ads, and ensure good user experience.
