=== Ad Commander - Ad Manager for Banners, AdSense, Ad Networks ===
Contributors: wildoperation, timstl
Tags: advertising, banners, adsense, rotate, agents
Requires at least: 6.2
Tested up to: 6.9
Stable tag: 1.4.2
Requires PHP: 7.4
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Donate link: https://wpadcommander.com/

Insert image banner ads, Google AdSense, Amazon, affiliate ad networks. Rotate and randomize. Manage with AI agents. Track impressions and clicks.

== Description ==

Ad Commander is a complete ad management plugin for WordPress. With Ad Commander, users can quickly create custom banner image ads, Google AdSense ads, Amazon Associates ads, and ads for other affiliate ad networks. Your AI agents can access your ads and statistics to help you manage campaigns.

Create groups of rotating banner ads or randomly displaying ads. Insert ads with shortcodes, template tags, blocks, or automatic inserts. Inject scripts into the header or footer of your site.

**AdSense users:** Ad Commander integrates directly with your AdSense account to make implementing AdSense and AMP ads quick and easy. Simply connect an account and choose from a searchable, sortable list of ad units. Alternatively, build your ads manually or paste in code.

Some key features of Ad Commander include:

* Create individual ads or groups of randomizing, rotating, or manually sorted ads
* AdSense ad type with direct AdSense account integration, manually built ad units, or simple code pasting
* Track impressions and clicks and generate reports for ads
* Support for AMP ads with amp-pixel and amp-analytics tracking
* Inject ads or groups using shortcodes, template tags, blocks, or automatic inserts
* Conditionally display ads with content targeting options
* Organize ads by campaign and advertiser
* Display required labels above ads
* Add custom code before and after ads or groups
* Dynamically create an ads.txt and manage it in the WordPress admin
* Familiar WordPress interface

AI Agent features (WordPress 6.9 and up):

* Allow agents to pull report data by date and ad
* Allow agents to fetch list of ads
* Additional features available in Ad Commander Pro

[Documentation](https://wpadcommander.com/documentation/?utm_source=wordpressorg&utm_medium=link&utm_campaign=readme) | [Support](https://wpadcommander.com/support/?utm_source=wordpressorg&utm_medium=link&utm_campaign=readme) 

## Demo Video
[youtube https://www.youtube.com/watch?v=dCQHwTIxfjM]

## Connecting AdSense
[youtube https://www.youtube.com/watch?v=TTR95aFhLls&t=4s]

## Creating rotating banner ads
[youtube https://www.youtube.com/watch?v=NpPgFlP0T0g]

Ad Commander core is free to download and use. Ad Commander Pro has additional advanced features. [Visit our website to learn more about Ad Commander Pro.](https://wpadcommander.com/?utm_source=wordpressorg&utm_medium=link&utm_campaign=readme)

Some Pro features include:

* Allow AI agents to manage your ads
* Automatically convert AdSense ads to AMP ads
* Google Analytics (GA4) or other third-party analytics tracking for impressions and clicks
* Max ad displays per page load (only display an ad once per page)
* Expire ads by date or maximum stats
* Advanced automatic insert positions
* Automatic inserts for bbPress and BuddyPress
* Lazy load ads when they enter the viewport
* Popup ads
* Sticky ads
* Visitor targeting options
* Click fraud prevention
* Geotargeting with MaxMind IP databases
* Content and visitor targeting for groups and automatic inserts
* Display groups in a grid layout
* Weighted or evenly distributed ad impressions
* Sync ad groups by campaign
* Priority email support

[All Features](https://wpadcommander.com/features/?utm_source=wordpressorg&utm_medium=link&utm_campaign=readme)

== Frequently Asked Questions ==

= Can AI Agents manage my ads? =

Ad Commander and Ad Commander Pro support the WordPress Abilities API available in WordPress 6.9 and up. This exposes much of the functionality of Ad Commander to AI Agents.

Read our documentation for more information.

= Does Ad Commander work with page caching? =

Ad Commander core supports server-side rendering. Many caching plugins offer fragmented caching. This could be used to make Ad Commander’s server-side rendering compatible with page caching. The implementation of fragmented caching varies between caching plugins and is not directly supported by Ad Commander, but may be possible to implement with developer assistance.

Ad Commander Pro offers three rendering methods: Server-side rendering, Client-side rendering, and Smart (combination) rendering. Client-side and Smart rendering are designed to work with page caching and all visitor targeting methods.

= Do I need to edit my theme to insert ads? =

Nope! Ads and groups can be inserted into your site using automatic inserts, shortcodes, or blocks.

= Can I manually insert ads and groups into my site or theme files? =

Yes! Individual shortcodes or PHP template tags can sometimes be a better solution than automatic inserts, depending on your specific site layout and circumstances. Both are available for ads and groups, and can be added to your theme files if desired.

= Will Ad Commander work with AdSense? =

Yes. Ad Commander offers multiple ways to insert AdSense ads. These include direct integration, manually building ads, or pasting code from your account. Ad Commander also supports AdSense auto ads and AMP Ads.

= Will Ad Commander work with my ad network? =

Ad Commander supports inserting any script code using the Text or Code ad type. These ads can be inserted within your site or placed in the site head or body using automatic inserts. The flexibility of this approach should allow any ad network to be used on your site. If you have trouble with a specific ad network, please reach out to support for help.

= Does Ad Commander work with bbPress and BuddyPress =

There are two options for implementing ads in bbPress or BuddyPress: 

The free version of Ad Commander can be implemented by editing your bbPress and BuddyPress templates using template tags.

Ad Commander Pro includes Automatic Inserts for bbPress and BuddyPress. View our documentation for a full list of supported ad locations.

= Can Ad Commander require consent before displaying ads? =

Yes - this is an optional feature. Ad Commander does not create consent banners, but can monitor a cookie and display ads after it exists.

The cookie name and value are unique to your consent management system and are specified in Ad Commander's settings. After your visitor accepts, ads will display as long as the consent cookie exists.

Consent management works best with client-side or smart rendering available in Ad Commander Pro. This feature will also work with server-side rendering, but there are some caveats (see documentation).

= Which versions of PHP is Ad Commander compatible with? =

Ad Commander and Ad Commander Pro are tested on PHP 7.4 - PHP 8.2. Support for PHP 8.3 is currently in beta but has no known issues at this time.

= Does Ad Commander work with Elementor? =

Yes. Elementor supports legacy style WordPress widgets. You can use Ad Commander's legacy widget within Elementor. Alternatively, you can embed an ad or group shortcode.

== Screenshots ==

1. Creating an individual ad in the WordPress admin uses a standard Add Post interface. Create your ad, assign it to groups, apply settings, and publish.
2. Ad Groups are WordPress taxonomies and are used to display a group of ads together. 
3. Inserts allow you to insert ads or groups automatically without implementing shortcodes, template tags, or blocks.
4. Detailed reports are generated if local tracking is enabled. Local tracking is available in Ad Commander core (free download).
5. Reports can be displayed in line or bar graphs, and filtered by ads and time period.
6. Creating an AdSense ad using direct account integration.
7. Fine-tune which features authenticated AI agents can access on your website.
8. Settings allow you to control some Ad Commander options from one central location.

== Changelog ==
= 1.4.2 =
* Performance: Reduce number of query rows required if tracking the same ad displayed multiple times
* Admin: Add admin error message for incompatbile MySQL, MariaDB, and SQLite database servers

= 1.4.1 = 
* Performance: Reduce impression tracking of multiple ads to single SQL statement
* Performance: Reduce number of ajax requests for impression tracking in some configurations
* Bug: Fix potential javascript error in some tracking configurations
* Feature: Adds support for new alternate local tracking script (Pro 1.4.1)
* Admin: Adds warning for SQLite users to local tracking settings
* Dev: Add ADCMDR_DEBUG_TRACKING constant to wp-config to enable console.logs in javascript console

= 1.4.0 =
* New Campaigns and Advertisers taxonomies for ads
* Support for Ad Commander Pro 1.4.0 (sync groups by Campaign)
* New reports by campaign and advertiser; Updated Reports UI
* Add support Campaigns and Advertisers to Abilities API for AI Agents
* Add legacy widget to support Elementor
* Updated admin menu and other UI improvements. Move shortcode and template tags to Actions menu.
* Update admin styling for future WordPress 7.0 compatibility

= 1.3.3 =
* Breaking change: Rename some filters and actions related to Automatic Inserts
* Tracking report by ad group (admin and AI agent ability)
* Update bot/crawler list to more up-to-date user-agents. Add adcmdr_bot_user_agent_list filter to modify list.
* Improve AMP tracking
* Update some admin interface elements based on user feedback

= 1.3.2 =
* Provide more detailed ad information to agents

= 1.3.1 =
* Expose Abilities to MCP Adapter

= 1.3.0 =
* Support for WordPress Abilities API
* NEW: Allow AI agents to pull reporting data and manage ads
* Misc fixes and improvements

= 1.2.5 =
* Additional settings for inserts
* Support for Ad Commaner Pro 1.2.2

= 1.2.4 =
* Support for Ad Commander Pro 1.2.1 (Export reports to CSV, Click fraud prevention)
* Misc improvements and fixes

= 1.2.3 =
* Replace text/code textareas with optional code editors throughout

= 1.2.2 =
* Fix potential error caused by specific combination of settings

= 1.2.1 =
* Update documentation links for some features

= 1.2.0 =
* Performance: Defer all JavaScript files
* Performance: No longer require jQuery on front-end (previously required for some inserts)
* Support for Ad Commander Pro 1.2.0
* Supports Pro's Sticky ad insert and max displays per page load
* Misc bug fixes and improvements

= 1.1.28 =
* Fix system status error if MaxMind database is missing

= 1.1.27 =
* Add geolocation information to debugging info
* Hide MaxMind license from debugging info

= 1.1.26 =
* Add system status tab to settings
* Update vendor packages

= 1.1.25 =
* Adjust CURL HTTP version when applicable

= 1.1.24 =
* Fix 'headers already sent' warning during wp-cron
* Ad Commander Pro 1.1.15 compatibility

= 1.1.23 =
* Fixes potential error on license page if Pro user hasn't yet updated

= 1.1.22 =
* WordPress 6.9 compatibility
* Improvements to Pro license system

= 1.1.21 =
* Update vendor packages 
* New debugging function

= 1.1.20 =
* Improve touch behavior on mobile devices
* Support for Ad Commander Pro 1.1.12 (popup improvements)

= 1.1.19 =
* Misc bug fixes and improvements

= 1.1.18 =
* Adds support for Ad Commander Pro 1.1.11 (grid group mobile stacking, additional rotating group methods)
* Improves fade transition for rotating groups
* Moves SCSS variables into CSS variables for easier customization

= 1.1.15 =
* Support for Ad Commander Pro 1.1.10; bbPress and BuddyPress integrations
* Misc bug fixes and improvements

= 1.1.14 =
* WordPress 6.8 compatibility
* Update vendor packages

= 1.1.13 =
* Translation updates
* Minor admin fixes and improvements

= 1.1.12 =
* Support for Ad Commander Pro 1.1.7, including lazy loading ads
* Improve click tracking when links open in same window
* Misc bug fixes and improvements

= 1.1.11 =
* Support for Ad Commander Pro 1.1.6, including 3rd party tracking scripts
* Deprecated woClickTrackComplete Javascript event
* Fixes potential error when tracking clicks that don't open in a new window

= 1.1.10 =
* Fixes banner ad display issue in admin occurring in some browsers

= 1.1.9 =
* Support for WordPress 6.7
* Security improvements
* Translation updates

= 1.1.8 =
* Adds localization support

= 1.1.7 =
* Bug fix: Fixes refresh interval on rotating ad groups
* Feature: Ability to set a 'stop tracking impressions' interval on rotating ad groups

= 1.1.6 =
* Bug fix: Blank report chart when filtered by date only
* Feature: Optional ad loading animation
* Misc: New hooks

= 1.1.5 =
* Enables compatibility with Ad Commander Tools add-on

= 1.1.4 =
* Misc UI/UX improvements
* Fixes potential error with inserts that have no items
* Adds future support for Ad Commander Tools add-on

= 1.1.3 = 
* Fixes potential error with some WordPress configurations

= 1.1.2 = 
* Sync AdSense account alerts to dashboard
* Post meta and query performance improvements
* UI/UX improvements
* WordPress 6.6 compatibility

= 1.1.0 = 
* Adds AdSense ad type with direct AdSense account integration
* Adds support for AMP ads and AMP analytics
* Misc bug fixes and improvements

= 1.0.15 =
* Moves Pro CSS out of core plugin to avoid loading unnecessary styles
* Misc bug fixes and improvements

= 1.0.14 =
* New columns while managing ads, groups, and inserts
* Adds sortable admin columns to ads, groups, and inserts
* Adds the ability to quickly copy shortcodes and template tags

= 1.0.13 =
* Bug fixes and improvements to content targeting and visitor targeting rules

= 1.0.11 =
* Adds support for date archives to content conditions
* General improvements to content and visitor conditions
* Adds the ability to disable wrappers to some automatic inserts
* Adds the ability to force server-side rendering to some automatic inserts
* Misc bug fixes and UI improvements

= 1.0.9 =
* Adds support for Popup inserts (Ad Commander Pro 1.0.4)
* Adds support for Max Ad/Insert Impressions & Max Ad Clicks (Ad Commander Pro 1.0.4)
* Copies ad groups when using duplicate feature
* Misc bug fixes and UI improvements

= 1.0.8 =
* Adds support for future plugin add-ons
* Misc bug fixes and UI improvements

= 1.0.7 =
* Improves visitor and content targeting logic
* Misc security improvements

= 1.0.6 =
* Improves compatibility with WordPress multisite
* Ability to add a custom prefix for class names and IDs
* Misc bug fixes and improvements

= 1.0.5 =
* Misc security improvements

= 1.0.4 =
* Adds ability to duplicate ads, inserts, and groups
* Misc bug fixes and improvements

= 1.0.3 =
* Override consent requirement on individual ads, groups, and inserts

= 1.0.2 =
* Adds Ad & Group block
* Misc bug fixes and UI improvements

= 1.0.1 =
* Ability to require consent before displaying ads
* Notification system on dashboard for common errors
* Updates frameworks to latest versions
* Misc bug fixes and security improvements

= 1.0.0 =
* Initial stable version

== Upgrade Notice ==
= 1.1.12 =
* Support for Ad Commander Pro 1.1.7, including lazy loading ads
* Improve click tracking when links open in same window
* Misc bug fixes and improvements

= 1.1.11 =
* Support for Ad Commander Pro 1.1.6, including 3rd party tracking scripts
* Deprecated woClickTrackComplete Javascript event
* Fixes potential error when tracking clicks that don't open in a new window

= 1.1.9 =
* Support for WordPress 6.7
* Security improvements

= 1.1.8 =
* Adds localization support

= 1.1.7 =
* Bug fix: Fixes refresh interval on rotating ad groups
* Feature: Ability to set a 'stop tracking impressions' interval on rotating ad groups

= 1.1.6 =
* Bug fix: Blank report chart when filtered by date only
* Feature: Optional ad loading animation

= 1.1.4 =
* Adds support for Ad Commander Tools add-on

= 1.1.3 = 
* Fixes potential error with some WordPress configurations

= 1.1.2 = 
* Sync AdSense account alerts to dashboard
* Performance and UX/UI improvements
* WordPress 6.6 compatibility

= 1.1.0 =
* AdSense ad type and direct AdSense integration
* AMP support

= 1.0.15 =
* Required for Ad Commander Pro 1.0.6
* Performance improvements and misc bug fixes

= 1.0.14 =
* Improved information and sortability in ad, group, and insert admin columns
* Adds the ability to quickly copy shortcodes and template tags

= 1.0.13 =
* Bug fixes and improvements to content targeting and visitor targeting rules

= 1.0.11 =
* Improvements to content and visitor conditions
* Adds the ability to disable wrappers to some automatic inserts
* Adds the ability to force server-side rendering to some automatic inserts
* Misc bug fixes and UI improvements

= 1.0.9 =
* Required for new features in Ad Commander Pro 1.0.4
* Misc bug fixes and improvements

= 1.0.8 =
* Adds support for future plugin add-ons
* Misc bug fixes and UI improvements

= 1.0.6 = 
* Improves compatibility with WordPress multisite
* Ability to add a custom prefix for class names and IDs

= 1.0.5 =
* Security improvements

= 1.0.4 =
* Adds ability to duplicate ads, inserts, and groups

= 1.0.3 = 
* Override consent requirement on individual ads, groups, and inserts

= 1.0.2 =
* Adds new Ad & Group block

= 1.0.1 =
* Adds the ability to require consent before displaying ads
* Bug fixes and security improvements.

= 1.0.0 =
* Initial stable version