Caching and speed plugins
How to keep WP Rocket, LiteSpeed Cache, Autoptimize, SiteGround Optimizer, Perfmatters, NitroPack and Cloudflare Rocket Loader from changing the AdCobalt code.
On this page
Speed plugins make pages faster by combining, minifying and delaying JavaScript. AdCobalt's code must run as it is, as early as possible, so it needs to be excluded from those features. If it is combined or delayed, it may run too late, or not at all, and your numbers drop.
In each plugin below, add an exclusion for the address of your AdCobalt script. You find the address in your installation code on the Install tab of any website. It is enough to enter its domain, for example the part between https:// and the next /.
WP Rocket
Go to Settings, WP Rocket, File Optimization. Add the script's domain to Excluded JavaScript Files (under Combine JavaScript files and Load JavaScript deferred) and to Excluded JavaScript Files under Delay JavaScript execution. Then clear the cache.
LiteSpeed Cache
Go to LiteSpeed Cache, Page Optimization, Tuning. Add the script's domain to JS Excludes, JS Deferred / Delayed Excludes and, if you use Guest Mode, to Guest Mode JS Excludes. Then purge all caches.
Autoptimize
Go to Settings, Autoptimize, JS, CSS & HTML. Add the script's domain to Exclude scripts from Autoptimize. Then clear the cache.
SiteGround Optimizer
Go to SiteGround Optimizer, Frontend, JavaScript. Add the AdCobalt script to Exclude from Combination, Exclude from Deferral and Exclude from Minification.
Perfmatters
Go to Settings, Perfmatters, Assets, JavaScript. If Delay JavaScript is on, add the script's domain to Delay JavaScript Exclusions. If Defer JavaScript is on, add it to Exclude from Deferral.
NitroPack
In the NitroPack dashboard, go to Settings, Advanced, Excluded Resources (or Optimization Exclusions) and add the script's domain so it is not optimized or delayed. Then purge the cache.
Cloudflare Rocket Loader
Rocket Loader delays every script on the page. Either turn it off under Speed, Optimization, or add data-cfasync="false" to the AdCobalt code, before src:
<script data-cfasync="false" async
src="https://maple.acstatic.com/river.js"
data-publisher="YOUR-ID"></script>
Use your own code from the dashboard and only add data-cfasync="false".
Check the page source
After saving and clearing the cache, open your site in a private window, right-click and choose View page source (or press Ctrl+U, or Cmd+Option+U on a Mac). Search for data-publisher. You should find the AdCobalt code exactly as you pasted it, with the same address. If you can't find it, or the address was replaced by a file from your own site (such as a combined .js file), the exclusion is not working yet.
Then check the Install tab: after a visit, the website shows as Installed.
Still stuck? Sign in and use Help & Support: it checks your setup and you can write to us from there.
Get help in your dashboard