OptinMonster Documentation

Documentation, Reference Materials, and Tutorials for OptinMonster

Home

Docs

How to Exclude OptinMonster Resources from Your Caching Plugin

How to Exclude OptinMonster Resources from Your Caching Plugin

Using a caching plugin is a great way to speed up your website, but sometimes it can prevent dynamic content, like your OptinMonster campaigns, from displaying correctly. To make sure your campaigns always appear as expected, you may need to tell your caching plugin not to optimize OptinMonster’s resources.

In this guide, you’ll learn how to exclude OptinMonster resources from many popular caching plugins.

Understanding Caching and OptinMonster

Before we dive into the steps, let’s quickly talk about what caching is. Think of it like your website taking a snapshot of a page. When a visitor arrives, your site shows them that quick snapshot instead of having to build the page from scratch every time. This makes your site load much, much faster!

To ensure OptinMonster functions correctly, you’ll need to prevent your caching plugin from changing our key JavaScript files. The setting in your plugin might be called exclude JavaScript files, exclude from minification, or exclude from defer.

You’ll need to exclude the script: a.omappapi.com/app/js/api.min.js

Below, you will find links to the official instructions for many popular caching plugins to help you find where to add these exclusions.

WP Rocket

WP Rocket makes it simple to exclude our scripts from its file optimization features. You can follow their official guide to learn how to add the OptinMonster resources to the exclusion lists in their settings.

NitroPack

NitroPack has a dedicated section for excluding resources from optimization. It’s important to note that NitroPack’s Ludicrous mode can be very aggressive and may override some exclusion rules. If you’re having trouble, you may need to disable Ludicrous mode first from NitroPack’s settings menu.

Cloudflare

If you’re using Cloudflare’s CDN, you can use its Page Rules feature to prevent certain resources from being cached. You can create a rule to bypass the cache for URLs containing OptinMonster’s script.

SiteGround Optimizer

The SiteGround Optimizer plugin has settings to exclude JavaScript files from minification. You can find these options in the plugin’s Frontend Optimization tab.

LiteSpeed Cache

LiteSpeed Cache provides detailed tuning settings within its Page Optimization section. You can add the OptinMonster URLs to the list of excluded JavaScript files.

W3 Total Cache

W3 Total Cache has many settings, but you’ll want to focus on the Minify section. There, you can specify JavaScript files that should never be minified, ensuring OptinMonster’s scripts are left untouched and run as intended.

WP-Optimize

With WP-Optimize, you’ll want to look for the settings related to minifying JavaScript files. You can add our scripts to the exclusion list there to prevent them from being minified or merged with other scripts.

Hummingbird

The Hummingbird plugin has a powerful Asset Optimization feature. Within its settings, you can add exclusions to prevent it from compressing or modifying OptinMonster’s files.

Breeze

Breeze, the caching plugin from Cloudways, includes options to exclude URLs and specific JavaScript files from minification in its Advanced Options tab.

Jetpack

Jetpack’s Site Accelerator feature speeds up static file load times. However, it does not currently offer a way to exclude specific files. If you find that your campaigns are not loading correctly, we recommend deactivating the Speed up static file load times option in your Jetpack settings.

Comet Cache

Comet Cache includes an HTML compressor that can affect scripts. To prevent issues, you’ll need to add an exclusion for the OptinMonster script to prevent it from being compressed or altered by this feature.

Powered Cache

Comet Cache allows you to exclude specific URLs or URI patterns from being minified. You can find these settings in the plugin’s Javascript Optimization panel.

Clearfy Cache

The Clearfy plugin offers performance optimization features, including minifying JavaScript. It’s important to add the OptinMonster script to the exclusion list to prevent it from being minified and ensure your campaigns display correctly.

Other Caching Plugins

Many other caching plugins offer similar exclusion settings. We recommend looking through your plugin’s documentation or settings panel for sections labeled Exclusions, Bypass, or Advanced to add the OptinMonster scripts.

Some plugins, such as Simple Cache, Hyper Cache may offer limited or no exclusion options. If you are using one of these and experience issues, you may need to disable the plugin or switch to a caching plugin with more granular controls.


FAQs

Will excluding OptinMonster’s files slow down my site?

Not at all! OptinMonster’s scripts are already highly optimized and load asynchronously, which means they don’t block your other content from loading. Excluding them from your site’s cache simply ensures you are always getting the most up-to-date version of our code so your campaigns run smoothly.

Why do I need to do this? My campaigns seem to be working.

Caching plugins store a static version of your site’s files to serve them to visitors more quickly. However, OptinMonster relies on dynamic scripts to target and display campaigns correctly. If an old version of our script is cached, it can lead to campaigns not appearing, targeting rules failing, or other unexpected behavior. It’s a proactive step to ensure everything always works perfectly.

What if my caching plugin isn’t on this list?

No problem! The list above covers many common plugins, but it’s not exhaustive. Almost every caching plugin includes a settings area where you can specify files or scripts to exclude from caching. Just look for a section in your plugin’s settings labeled Exclusions, Advanced, or something similar, and add the OptinMonster resources mentioned at the start of this guide.


If you’re serious about jumpstarting your website business growth, then get started with OptinMonster today!

Get Started With OptinMonster Today!

BONUS: Done-For-You Campaign Setup ($297 value)

Our conversion experts will design 1 free campaign for you to get maximum results – absolutely FREE!

Click here to get started →


Still stuck?

How can we help?

Last updated on


Start Getting More
Leads & Sales Today
with OptinMonster!

Create and launch smart capture forms today in minutes. What are you waiting for?

Create and launch smart capture forms
today in minutes. What are you waiting for?

OptinMonster has transformed our business. Before integrating their optins, our clients saw a 2% conversion rate from web traffic, which is slightly above the standard for their industry. With the integration of OptinMonster’s lightbox popup, exit-intent technology, split testing, and other tools, our client’s conversion rates soared by an unprecedented 500%. They attracted substantially more customers while spending less on digital advertising. Their success propelled them to the top of their markets, outperforming national chains and other medical spas with much bigger marketing budgets. Our client’s success in their market has distinguished us in our own. We are now one of the most sought-after marketing firms in the industry of aesthetic medicine. We know that the integration of OptinMonster, more than any other tool or marketing strategy, has supported this growth and achievement.

chris zelig medstar media

Chris Zelig

Partner, Medstar Media

OptinMonster has been a game-changer for us. From driving donations to collecting new leads, there is nothing that this simple tool has failed to accomplish. Our lead collection rate has jumped by over 1,000%.

joe lowe american bird conservancy

Joe Lowe

Director of Digital Communications, American Bird Conservancy

Through OptinMonster’s exit-intent popups, we have more than doubled our sales conversion rate. Best of all is the compound effect of using OptinMonster over a long period of time—more conversions mean more customers, which means more word of mouth.

mitch smith, managing director, shockbyte

Mitch Smith

Managing Director, Shockbyte.com