=== Ad Unblock === Contributors: adunblock Tags: ad blocker, revenue recovery, monetization, ad recovery Requires at least: 5.0 Tested up to: 7.2 Stable tag: 1.2.0 Requires PHP: 7.0 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Integrate your WordPress site with Ad Unblock service to recover ad revenue lost to ad blockers. == Description == Ad Unblock plugin allows you to easily integrate your WordPress site with the [Ad Unblock](https://ad-unblock.com) service, which helps you recover ad revenue lost due to ad blockers. = Key Features = * Connect your Ad Unblock account from the settings page: no Account ID to copy, and your site is added to your account for you * Or enter an Account ID yourself * Checks that Ad Unblock has verified your site, from the settings page * Control which pages the script runs on (all pages, specific URL patterns, categories, or tags) * Sends your site domain with the script source request, so your site keeps working when a filter list blocks the shared script host * Automatically inserts the required script into your site's header * Caches API requests for optimal performance = How It Works = 1. Go to Settings → Ad Unblock and click "Connect your Ad Unblock account" 2. Log in or create a free account at [ad-unblock.com](https://ad-unblock.com), then confirm your site 3. You are sent back to the plugin with your Account ID saved and your site added to your account 4. Clear your page cache if you use one 5. Configure on which pages the script should run 6. Start recovering your ad revenue! Prefer to do it by hand? Choose "Enter an Account ID instead", paste the Account ID from your Ad Unblock dashboard, and add your site there. == Installation == 1. Upload the plugin files to the `/wp-content/plugins/ad-unblock` directory, or install the plugin through the WordPress plugins screen directly. 2. Activate the plugin through the 'Plugins' screen in WordPress 3. Go to Settings → Ad Unblock and click "Connect your Ad Unblock account", or enter your Account ID from the Ad Unblock dashboard 4. Clear your page cache if you use one 5. Configure which pages should have the script enabled == External services == This plugin connects to the Ad Unblock service (https://public.adunblocker.com/api/vendor_scripts) to obtain script source URLs. The script source URLs may change hence the server side fetch. It also connects to the Ad Unblock dashboard (https://ad-unblock.com), only when you ask it to: to connect your account, and to check that your site is verified. = Data Transmitted = * The plugin fetches script source URLs from https://public.adunblocker.com/api/vendor_scripts (cached for 5 minutes) * Your site's own domain is sent with that request as the `domain` query parameter, so the service can answer with a script host reserved for your site. It is taken from your site address and can be changed or left blank in the plugin settings. * When you click "Connect your Ad Unblock account", your browser goes to https://ad-unblock.com/connect/wordpress with your site's domain, the address of the plugin's settings page (to send you back to it), a short-lived token and the plugin's version. Nothing is sent until you click. * When you connect, save an Account ID or click "Check verification", the plugin sends your site's domain and your Account ID to https://ad-unblock.com/api/sites/verify, and Ad Unblock loads your site's public pages to look for the tag. It answers only whether the site is verified. * No personal user data is collected or transmitted by the plugin itself The external service is provided by Ad Unblock: * [Terms of Service](https://ad-unblock.com/terms) * [Privacy Policy](https://ad-unblock.com/privacy/wp-plugin) == Frequently Asked Questions == = Do I need an Ad Unblock account to use this plugin? = Yes, you need to register at [ad-unblock.com](https://ad-unblock.com) to get an Account ID. = Where do I find my Account ID? = You don't need to look for it: click "Connect your Ad Unblock account" in the plugin settings and it is saved for you. If you would rather enter it yourself, it is in your Ad Unblock dashboard after you register on ad-unblock.com. = Connect is not offered on my site. Why? = Ad Unblock verifies a site by loading it from the internet, so a site on localhost, an IP address or a local-only name cannot be connected. Enter an Account ID yourself to try the plugin there. = The plugin says my site is not verified. What now? = Clear your page cache first: a cached page from before the plugin was set up goes out without the tag (see "Clear your page cache" on the settings page). If you entered the Account ID yourself, also check that the site is added to that account in your Ad Unblock dashboard. Then click "Check verification" again. Ad Unblock looks for the tag on the home page of your domain. If WordPress is in a subdirectory (`example.com/blog/`), or "Enable On Pages" leaves your home page out, it is not there to find: the settings page says so under "Check verification" and links to your Ad Unblock dashboard, where you add the site with the address of a page that has the tag. If the settings page says the tag is not being added to your pages, your site could not load the script sources from Ad Unblock, so there is nothing to verify yet. Check the API Endpoint setting, or ask your host whether outgoing requests are blocked. = Can I control which pages have the script? = Yes, you can choose to enable the script on all pages, specific URL patterns, categories, or tags. = What is the Site Domain setting for? = Filter lists sometimes block a script host for one publisher's site specifically, rather than for every site using it. Sending your domain with the script source request lets Ad Unblock move just your site onto its own script host when that happens, instead of rotating every site onto a new one. It is detected automatically from your site address, so there is normally nothing to change. Left blank, it keeps following your site address, so it stays correct if you ever move the site. Fill it in only if Ad Unblock asks you to use a specific domain. = Does it work with caching and performance plugins? = The script tag is printed with `data-cfasync="false"` and `nowprocket`, which exclude it from Cloudflare Rocket Loader and WP Rocket's *Delay JavaScript Execution*. Ad recovery has to run before your ad code, so the tag must not be deferred, combined or rewritten. Two options still need a manual exclusion, because neither honours an attribute: * **WP Rocket — Load JavaScript deferred**: add your Ad Unblock script URL to its *Excluded JavaScript Files* list. * **LiteSpeed Cache, Autoptimize, W3 Total Cache, SG Optimizer, Perfmatters**: add the URL to their JS exclusion lists, covering combine, defer and delay. The script URL is the one in the `