Advertising Settings
Advertising Settings
Overview
The Advertising Settings module provides centralized control over your entire advertising system. Configure Google AdSense integration, custom advertisements, adblock detection, and advanced loading options all from one interface. These settings affect how ads are displayed across your entire application.
Accessing Advertising Settings
Navigation path: Dashboard > Advertising > Settings
Required permission: manage_ads
Key Features
- Master Ad Control: Enable or disable the entire advertising system with one toggle
- AdSense Integration: Configure Google AdSense with your Publisher ID
- Custom Ads Support: Enable and configure custom fallback advertisements
- Adblock Detection: Monitor and respond to ad-blocking software
- Advanced Options: Control lazy loading and auto-refresh behavior
- User Targeting: Choose whether to show ads to logged-in users
Settings Sections
General Settings
Control the overall advertising system behavior.
Enable Advertising System
- Type: Toggle (Checkbox)
- Default: Enabled
- Description: Master switch to enable or disable all advertisements across the application
- Impact: When disabled, no ads will be displayed anywhere on the site
Show Ads to Logged-in Users
- Type: Toggle (Checkbox)
- Default: Enabled
- Description: Control whether authenticated users see advertisements
- Use Case: Disable to provide an ad-free experience for registered users
Google AdSense Settings
Configure your Google AdSense integration for automated ad serving.
Enable AdSense
- Type: Toggle (Checkbox)
- Default: Enabled
- Description: Enable or disable Google AdSense advertisements
- Note: Requires valid Publisher ID to function
AdSense Publisher ID
- Type: Text Input
- Required: Yes (when AdSense is enabled)
- Format:
ca-pub-XXXXXXXXXXXXXXXX - Description: Your unique Google AdSense Publisher ID
- Where to Find: Available in your Google AdSense account dashboard
- Example:
ca-pub-1234567890123456
Enable AdSense Auto Ads
- Type: Toggle (Checkbox)
- Default: Disabled
- Description: Let Google automatically place and optimize ads across your site
- Benefits:
- Automatic ad placement optimization
- Works alongside manual placements
- Maximizes revenue potential
- Reduces manual configuration
Getting Your Publisher ID:
- Visit https://www.google.com/adsense
- Sign in to your AdSense account
- Navigate to Account > Settings
- Find your Publisher ID (format: ca-pub-XXXXXXXXXXXXXXXX)
Custom Ads Settings
Configure custom advertisements as alternatives or supplements to AdSense.
Enable Custom Ads
- Type: Toggle (Checkbox)
- Default: Enabled
- Description: Enable custom fallback advertisements
- Use Case: Display your own ads when AdSense is unavailable or blocked
Use Custom Ads as Primary
- Type: Toggle (Checkbox)
- Default: Disabled
- Description: Show custom ads first instead of AdSense
- Benefits:
- Better ad blocker evasion
- Full control over ad content
- No revenue sharing
- Faster loading times
Custom Ads Strategy:
- When disabled: Custom ads serve as fallback when AdSense is blocked
- When enabled: Custom ads display first, AdSense as fallback
- Useful for promoting your own products or services
- Can help bypass ad blockers more effectively
Adblock Detection Settings
Monitor and respond to users with ad-blocking software.
Enable Adblock Detection
- Type: Toggle (Checkbox)
- Default: Enabled
- Description: Detect and log ad blocker usage
- Data Collected: IP address, page URL, user agent, timestamp
Show Adblock Message
- Type: Toggle (Checkbox)
- Default: Enabled
- Description: Display a message when ad blocker is detected
- Purpose: Inform users about ad blocking and request support
Adblock Message Text
- Type: Textarea
- Max Length: 500 characters
- Default: "Please consider disabling your ad blocker to support our website. We use ads to keep our content free and accessible to everyone."
- Description: Customizable message shown to users with ad blockers
- Tips:
- Keep the message polite and non-aggressive
- Explain why ads are important
- Consider offering alternatives (subscriptions, donations)
- Test different messages to find what works best
Advanced Settings
Fine-tune ad loading and display behavior.
Enable Lazy Loading
- Type: Toggle (Checkbox)
- Default: Disabled
- Description: Load ads only when they become visible in the viewport
- Benefits:
- Improves initial page load speed
- Reduces bandwidth usage
- Better Core Web Vitals scores
- Saves resources for ads users never see
Auto-Refresh Interval
- Type: Number Input
- Range: 0-300 seconds
- Default: 0 (disabled)
- Description: Automatically refresh ads after specified seconds
- Use Cases:
- Increase ad impressions on long-form content
- Useful for pages with long session times
- Can improve revenue on high-traffic pages
- Recommendations:
- Set to 0 to disable
- Use 30-60 seconds minimum to avoid annoying users
- Test impact on user experience
- Check AdSense policy compliance
Common Tasks
Setting Up Google AdSense
- Navigate to Dashboard > Advertising > Settings
- Scroll to the Google AdSense Settings section
- Check Enable AdSense
- Enter your AdSense Publisher ID (format: ca-pub-XXXXXXXXXXXXXXXX)
- Optionally enable AdSense Auto Ads for automatic optimization
- Click Save Advertising Settings
- Create ad units in Ads Management
Configuring Custom Ads
- Go to Dashboard > Advertising > Settings
- Scroll to Custom Ads Settings
- Check Enable Custom Ads
- Decide if you want custom ads as primary or fallback
- Check Use Custom Ads as Primary if desired
- Click Save Advertising Settings
- Create custom ads in Ads Management
Setting Up Adblock Detection
- Navigate to Dashboard > Advertising > Settings
- Find the Adblock Detection Settings section
- Check Enable Adblock Detection
- Check Show Adblock Message if you want to display a message
- Customize the Adblock Message Text to your preference
- Click Save Advertising Settings
- Monitor detections in Adblock Logs
Optimizing Page Performance
- Go to Dashboard > Advertising > Settings
- Scroll to Advanced Settings
- Check Enable Lazy Loading to improve page load times
- Set Auto-Refresh Interval to 0 (or desired value)
- Click Save Advertising Settings
- Test page load speed with tools like Google PageSpeed Insights
Disabling All Ads Temporarily
- Navigate to Dashboard > Advertising > Settings
- In General Settings, uncheck Enable Advertising System
- Click Save Advertising Settings
- All ads will be hidden across the entire site
- Re-enable when ready by checking the box again
Permissions
The following permission is required to access and modify advertising settings:
manage_ads: Full access to view and modify all advertising settings
Users without this permission will see an "Access Denied" message.
Tips and Best Practices
AdSense Configuration
- Always verify your Publisher ID is correct before saving
- Enable Auto Ads for automatic optimization, but monitor performance
- Combine Auto Ads with manual placements for best results
- Check AdSense policy compliance regularly
Custom Ads Strategy
- Use custom ads to promote your own products or services
- Custom ads are less likely to be blocked than AdSense
- Consider using custom ads as primary for better control
- Test different ad formats to find what works best
Adblock Detection
- Keep adblock messages polite and non-confrontational
- Explain why ads are necessary for your site
- Offer alternatives like subscriptions or donations
- Don't be too aggressive with anti-adblock measures
Performance Optimization
- Enable lazy loading for ads below the fold
- Use auto-refresh sparingly to avoid annoying users
- Monitor page load times after enabling features
- Test on mobile devices as well as desktop
User Experience
- Don't show too many ads to logged-in users
- Consider disabling ads for premium members
- Balance revenue with user experience
- Test different configurations to find the sweet spot
Troubleshooting
AdSense Ads Not Displaying
Problem: AdSense ads are not showing on the site
Solutions:
- Verify Enable Advertising System is checked
- Confirm Enable AdSense is checked
- Check that your Publisher ID is correct (format: ca-pub-XXXXXXXXXXXXXXXX)
- Ensure you have created ad units in Ads Management
- Verify placements are configured and active
- Check browser console for JavaScript errors
- Confirm your AdSense account is approved and active
Custom Ads Not Working
Problem: Custom ads are not displaying
Solutions:
- Verify Enable Advertising System is checked
- Confirm Enable Custom Ads is checked
- Check that you have created custom ads in Ads Management
- Verify placements are configured for your custom ads
- Ensure ad content (images, HTML) is valid
- Check that ads are set to active status
Adblock Detection Not Logging
Problem: Adblock detections are not being recorded
Solutions:
- Verify Enable Adblock Detection is checked
- Test with an actual ad blocker installed
- Check browser console for JavaScript errors
- Ensure the detection script is loading properly
- Verify database permissions for logging
- Check that the adblock logs table exists
Performance Issues
Problem: Page load times have increased after enabling ads
Solutions:
- Enable Lazy Loading for ads below the fold
- Reduce the number of ad placements per page
- Disable Auto-Refresh or increase the interval
- Use responsive ads instead of fixed-size ads
- Optimize custom ad images for web
- Consider using AdSense Auto Ads instead of manual placements
Ads Showing to Wrong Users
Problem: Ads are showing to users who shouldn't see them
Solutions:
- Check Show Ads to Logged-in Users setting
- Verify user roles and permissions
- Review placement targeting rules
- Clear application cache
- Test in incognito mode to rule out caching issues
Related Modules
- Ads Management: Create and manage individual advertisements
- Ad Placements: Control where ads appear on your site
- Adblock Logs: Monitor ad-blocking software usage
- Media Library: Upload images for custom ads
Quick Start
Get Started in Minutes
Follow these simple steps to get Launchpanel - Laravel Admin Panel & Dynamic Website Starter Kit up and running quickly.
Quick Links
Need More Help?
Our comprehensive documentation covers everything from basic setup to advanced configurations. Check out these additional resources: