You know how important page speed is, and one of the key elements is minifying and optimizing your site’s source code. A WordPress plugin that does that automatically and very well is Autoptimize.
Do you have to miss out on the great features that Autoptimize comes with when running ads?
The answer is, of course, no. Because Autoptimize also offers a way to make exceptions from this behavior for particular pieces of code. Advanced Ads Pro now uses this feature automatically for every ad code.
How can you exclude ads from Autoptimize?
The plugin automatically detects if Autoptimize is installed and makes each ad managed with Advanced Ads an exception from Autoptimize code optimization.
Don’t exclude AA scripts from Autoptimize
There is a setting in Autoptimize that allows you to exclude specific scripts from optimization.
Adding Advanced Ads’ script there might instead break than fix something. If your issue still gets resolved, adding scripts here, then please let us know.
General advice: Checking load order
The most important you need to understand when using the many options from Autoptimize is dependencies. This means that some parts of our and the ad’s code depend on other code, and if this does not load in time, nothing will work.
jQuery.js should be the first thing to load. Then the files of Advanced Ads Pro need to be added. Only after that can ads show up.
We discussed this issue with the author of Autoptimize in their support forum here, which is an excellent resource for learning more about Autoptimize.