FAQ: How to exclude Continually from WordPress caching

Bots are not loading on your website because of an outdated embed code? This is happening when your website minifies / combines the Continually embed code and caches it on your website rather than requesting it from Continually directly.

Continually has a fast release cycle, we release new features, enhancements and fixes each Monday, when this happens the Continually embed code gets updated and to run the bots correctly you need to have the latest version served to your customers.

This issue usually exists on WordPress websites because of an aggressive caching plugin that caches the external resources, so on this article we will explain how you can exclude Continually embed code from such plugins. 

Note : If the following methods does not work on your website or if your can't find the plugin you use, please check the alternate embed code that prevents caching plugins from combining the Continually embed code.

In this article

WP Rocket

Exclude Continually embed code 

Go to Settings → WP Rocket → File Optimization tab, then find the Excluded JavaScript Files section, copy and paste the following link and save.

 https://cdn-app.continual.ly/js/embed/continually-embed.latest.min.js

Clear cache

In case you want to clear the cache; go to Settings → WP Rocket → Dashboard tab and then click on the Clear Cache.


LiteSpeed 

Exclude Continually embed code 

From the LiteSpeed Cache setting go to Page Optimization → Tuning and find the JS Excludes section and paste the following link into it.

 https://cdn-app.continual.ly/js/embed/continually-embed.latest.min.js

Clearing Cache

From the LiteSpeed Cache setting go to  Toolbox then click on the 'Clear All - CSS/JS Cache'.


Fastest Cache

Exclude Continually embed code 

Go to WP Fastest Cache settings -> Exclude, scroll down until you reach the Exclude JS option and click on Add New Rule.

Copy and paste the following text and click Save.

continually-embed.latest.min.js

Clearing Cache

Go to WP Fastest Cache settings -> Delete Cache and click on  Delete Cache and Minified CSS/JS.


Swift Performance

Exclude Continually embed code 

Go to Tools > Swift Performance > Optimizations and paste the following code in the Exclude Scripts field.

continually-embed.latest.min.js

Clearing Cache

Go to Tools > Swift Performance -> Dashboard and click on Clear All Cache.


Alternate embed code that escapes caching

Sometimes a caching plugin would load the embed code before processing your AppID, this causes an issue as we need to know your AppID before you make the call so we can identify your bots and which ones to load for them. This alternate method will combine the embed code into just one script tag that enforces the caching plugins to treat it as a single code with the same order.

All you need to do is to change the XXXXXX in the AppID line below with your AppID from your embed code, then replace your current embed code on your website with this one :

<script>var continuallySettings = { appID: "XXXXXX" };
const script = document.createElement("script")
script.type = "text/javascript"
script.src = "https://cdn-app.continual.ly/js/embed/continually-embed.latest.min.js"
document.head.appendChild(script)
eval(script)
</script>
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.