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 add-on automatically detects if Autoptimize is installed and makes each ad managed with Advanced Ads an exception from Autoptimize code optimization.
In case that you might not want to exclude your ads from Autopimize – e.g., if you only have ads with static HTML – then you can also disable this feature in the Pro-settings.
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
When using the many options from Autoptimize, the most important you need to understand is dependencies. This means that some parts of our and the ad’s code depend on other code, and if this is not loaded in time, nothing will work. In general,
jQuery.js should be the first thing to load. Then the files of Advanced Ads Pro need to be added. Only after that, ads can show up.
We discussed such an issue with the author of Autoptimize in their support forum here, which is an excellent resource to learn a bit more about Autoptimize.