Skip to Content

Comprehensive documentation to help you get started and make the most of this feature.

Launchpanel - Laravel Admin Panel & Dynamic Website Starter Kit Updated 1 day ago

Advertising Settings

8 min read
Updated 1 day ago

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:

  1. Visit https://www.google.com/adsense
  2. Sign in to your AdSense account
  3. Navigate to Account > Settings
  4. 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

  1. Navigate to Dashboard > Advertising > Settings
  2. Scroll to the Google AdSense Settings section
  3. Check Enable AdSense
  4. Enter your AdSense Publisher ID (format: ca-pub-XXXXXXXXXXXXXXXX)
  5. Optionally enable AdSense Auto Ads for automatic optimization
  6. Click Save Advertising Settings
  7. Create ad units in Ads Management

Configuring Custom Ads

  1. Go to Dashboard > Advertising > Settings
  2. Scroll to Custom Ads Settings
  3. Check Enable Custom Ads
  4. Decide if you want custom ads as primary or fallback
  5. Check Use Custom Ads as Primary if desired
  6. Click Save Advertising Settings
  7. Create custom ads in Ads Management

Setting Up Adblock Detection

  1. Navigate to Dashboard > Advertising > Settings
  2. Find the Adblock Detection Settings section
  3. Check Enable Adblock Detection
  4. Check Show Adblock Message if you want to display a message
  5. Customize the Adblock Message Text to your preference
  6. Click Save Advertising Settings
  7. Monitor detections in Adblock Logs

Optimizing Page Performance

  1. Go to Dashboard > Advertising > Settings
  2. Scroll to Advanced Settings
  3. Check Enable Lazy Loading to improve page load times
  4. Set Auto-Refresh Interval to 0 (or desired value)
  5. Click Save Advertising Settings
  6. Test page load speed with tools like Google PageSpeed Insights

Disabling All Ads Temporarily

  1. Navigate to Dashboard > Advertising > Settings
  2. In General Settings, uncheck Enable Advertising System
  3. Click Save Advertising Settings
  4. All ads will be hidden across the entire site
  5. 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:

  1. Verify Enable Advertising System is checked
  2. Confirm Enable AdSense is checked
  3. Check that your Publisher ID is correct (format: ca-pub-XXXXXXXXXXXXXXXX)
  4. Ensure you have created ad units in Ads Management
  5. Verify placements are configured and active
  6. Check browser console for JavaScript errors
  7. Confirm your AdSense account is approved and active

Custom Ads Not Working

Problem: Custom ads are not displaying

Solutions:

  1. Verify Enable Advertising System is checked
  2. Confirm Enable Custom Ads is checked
  3. Check that you have created custom ads in Ads Management
  4. Verify placements are configured for your custom ads
  5. Ensure ad content (images, HTML) is valid
  6. Check that ads are set to active status

Adblock Detection Not Logging

Problem: Adblock detections are not being recorded

Solutions:

  1. Verify Enable Adblock Detection is checked
  2. Test with an actual ad blocker installed
  3. Check browser console for JavaScript errors
  4. Ensure the detection script is loading properly
  5. Verify database permissions for logging
  6. Check that the adblock logs table exists

Performance Issues

Problem: Page load times have increased after enabling ads

Solutions:

  1. Enable Lazy Loading for ads below the fold
  2. Reduce the number of ad placements per page
  3. Disable Auto-Refresh or increase the interval
  4. Use responsive ads instead of fixed-size ads
  5. Optimize custom ad images for web
  6. 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:

  1. Check Show Ads to Logged-in Users setting
  2. Verify user roles and permissions
  3. Review placement targeting rules
  4. Clear application cache
  5. Test in incognito mode to rule out caching issues

Related Modules

Quick Start

Get Started in Minutes

Follow these simple steps to get Launchpanel - Laravel Admin Panel & Dynamic Website Starter Kit up and running quickly.

1
Install
Download and install the package
2
Configure
Set up your configuration
3
Deploy
Launch your application

Need More Help?

Our comprehensive documentation covers everything from basic setup to advanced configurations. Check out these additional resources:

Was this helpful?

Let us know if you found this documentation useful.