To ensure that ads load consistently, it is important to exclude the Journey script from any optimizations you are running on your site.
Optimizing the Journey by Mediavine script in any way can result in ads loading inconsistently which may negatively impact your revenue.
Once you’ve followed steps to exclude our script, be sure to clear your cache so that you are seeing the most recent version of your site.
Lazy-loading plugins
If you are using a lazy-loading plugin, make sure the plugin is set to ONLY lazy load images and NOT iFrames and other embed types. We already lazy-load our ads so lazy-loading iframes causes our ads to get lazy-loaded twice, significantly harming site and ad performance.
Note: Previously, WP Rocket's lazy load setting for iframes and videos conflicted with our ads by catching them in a lazy load loop. Their current implementation of this setting doesn't conflict with our ads, however, we recommend keeping an eye on your dashboard after each WP Rocket update to ensure there is no impact on earnings or ad performance
WP Rocket
Navigate to the WP Rocket Settings → File Optimization → Scroll down to Javascript Files and be sure to exclude “scriptwrapper” from being combined, minified or deferred:
We have also seen issues where the Delay Javascript setting affects our script negatively. If you are experiencing issues with ads, we recommend unchecking this setting:
We recommend keeping an eye on any updates to WP Rocket, specifically any settings that delay/defer JavaScript and Lazy-loading since any major changes to these settings can interfere with ads.
Perfmatters
Navigate to the Perfmatters Plugin Settings → Assets and put the word “scriptwrapper” in each Exclusion list:
NitroPack
In your Nitropack settings, you’ll want to make sure that your Optimization Mode is set to “Standard”:
Hummingbird
Navigate to Hummingbird Pro settings → Asset Optimization and remove/uncheck the Mediavine script wrapper from being combined, compressed, or delayed:
Litespeed Cache
In Litespeed Cache, navigate to Page Optimization > Tuning. In the JS Excludes and JS Deferred/Delayed Excludes fields, add the word "scriptwrapper".
Other Optimization Plugins
If you are using another optimization plugin, then you’ll want to make sure that the Journey script is excluded from any Javascript combining, minifying, or bundling.
Typing the word “scriptwrapper” in the exclusions list should take care of any script optimizations.
For optimization plugins that require the entire script URL, you can navigate to your Journey settings, click “Copy Code” under the Ads Script section, and place that under javascript exclusions.