Skip to main content

Integrating OptiMonk with the WooCommerce e-commerce platform

Updated over 2 months ago

Integrating OptiMonk with WooCommerce is very simple and you will be ready to start showing your campaigns in no time. Before we get started with installing the plugin onto your WooCommerce site you will need to have an account with OptiMonk, if you do not already have an account with OptiMonk then please register for your account here.

First, you will need to log in to the admin page of your WordPress website.

WooCommerce is a WordPress plugin, so the admin page of your website will look similar to a WordPress website admin page. In order to use OptiMonk, you just need to install the OptiMonk plugin for your website.

Please also note that depending on if you use WordPress.org or WordPress.com, the admin page might look a little bit different, but the steps to install OptiMonk are similar.

To install the OptiMonk plugin, please follow these steps:

1) Login to your WordPress dashboard, on the left side menu, select Plugins > Add New

WooCommerce1.png

2) On the plugin page, you will need to use the search function and enter “OptiMonk”, you should see the plugin “Exit Popups & Onsite Retargeting by OptiMonk”. Click on “Install Now” to install the OptiMonk plugin, once it has been installed you will then need to activate the plugin.

WooCommerce2.png

3. Once you have activated the plugin you will be taken to the OptiMonk plugin settings page where you will need to enter your OptiMonk Account ID, you will need to get the OptiMonk Account ID from your OptiMonk account dashboard.

WooCommerce3.png

After activation has been completed successfully, you’ll find the OptiMonk plugin in the list of Installed Plugins.

4) Log in to your account at https://app.optimonk.com/

5) Go to Settings by first selecting your account info on the navbar.

OptiMonk Admin - Google Chrome 2025-08-28 09.14.43.png

6) Select Domains on the left panel.

OptiMonk Admin - Google Chrome 2025-08-28 09.20.48.png

7) Add the domain of your website if you haven’t already.

OptiMonk Admin - Google Chrome 2025-08-28 09.26.55.png

8) Copy your OptiMonk ID from your URL.

OptiMonk Admin - Google Chrome 2025-08-28 09.38.09.png

9) Return to the WordPress admin page and navigate to Appearance on the left. Select OptiMonk, and insert your OptiMonk ID Number into your OptiMonk WordPress Plugin.

OptiMonk ‹ woocommersetest — WordPress - Google Ch.png

10) Click on Save Changes to finish the setup.

❗Make sure your cache plugin doesn't interfere with the OptiMonk plugin

OptiMonk may not work immediately on WordPress sites due to the presence of a cache plugin. These plugins help speed up websites by compressing and generating HTML files, which reduces server resources. To make sure that OptiMonk runs smoothly and your campaigns appear on your website, we strongly recommend the following steps:

Add the following domains to the cache ignore list:

Purge the cache on your website

If you are not sure how to do this, please take a look at our guide for setting up different types of WordPress cache plugins to work with OptiMonk.

How to set up WordPress Cache to work well with OptiMonk

Sometimes when OptiMonk is installed on WordPress sites, it will not always work straight away as most WordPress sites have a cache plugin installed. Cache plugins help to make your website faster by compressing and generating HTML files for your WordPress site, this helps reduce server resources like database queries and PHP compilation by serving static HTML pages.

You can quickly check if the website is using some cache system using - https://cache-checker.com

If we see any form of Cache hit, then this means that the website is serving a cached version of the website.

There are a number of different cache plugins for WordPress and this article will try and go over most of these:

Autoptimize

When you are using Autoptimize, you need to add this to the list of scripts that should not be cached.

Open Autoptimize, and under the JavaScript Options settings, we need to add:

to the Exclude Scripts from Autoptimize. We also need to tell Autoptimize to load the OptiMonk script async. Go to the Extra tab on the Autoptimize Settings page, and add https://onsite.optimonk.com/script.js to the Async Javascript-files (advanced users)

Autoptimize has a basic toolbar at the top of the page where you can easily delete the cache. Click on Autoptimize and click on Clear CSS/JS Cache.

Test your website and the OptiMonk campaign should now appear 🙂

Comet Cache

Cache files created by Comet Cache can be deleted by clicking on Comet Cache on the left side menu of the WordPress Dashboard.

To delete the cache you will need to click on the Clear button with a small brush icon found at the top right of the page.

Once this has been completed the OptiMonk app should start appearing as it should :)

Litespeed Cache

Litespeed cache is generally found in the toolbar on the WordPress dashboard. To delete the cache from Litespeed you will need to click on the Litespeed icon and click on “Purge All”, please note that if you are using Litespeed enterprise then this may take a few moments to clear the CDN cache data.

Once the cache has been purged OptiMonk should appear on your website :)

Nginx Helper

Nginx cache is a bit different from the standard Apache cache that most web hosts provide to their customers. This is due to how Nginx utilizes the fastcgi or redis-cache and due to this the Nginx cache would normally need to be done on the server, however, the Nginx Helper plugin allows you to delete the cache from within WordPress.

Depending on the settings you can normally delete the cache by clicking on “Purge cache” in the top toolbar.

However, there may be some cases where the “enable Purge” settings have been disabled so this will not show the Purge Cache button in the top bar. In order to delete the Nginx cache if you cannot see this button in the toolbar, you will need to click on Settings > Nginx Helper from the dashboard side menu.

On the Nginx Helper plugin page, you will be able to Purge the Entire Cache, once this has been done the OptiMonk campaigns should start working on your website :)

WP Rocket

If you are using WP Rocket, you will need to add the following OptiMonk URLs to the Remove from Javascript Deferred List as well as the Minify JavaScript Files:

The following screenshot is of the Defer List - WP Rocket Support Document - https://docs.wp-rocket.me/article/976-exclude-files-from-defer-js

The following screenshot is of the Minify List - WP Rock Support Document - https://docs.wp-rocket.me/article/915-find-the-right-js-files-to-exclude-from-minification

Once these have been added and saved, you will need to clear and preload the cache.

WP Super Cache

WP Super Cache has a standard delete cache in the top toolbar with the text “Delete Cache”. Just click on this and the cache will be deleted.

There may be times when the “Delete Cache” text is not shown at the top of the page so you will need to open the actual WP Super Cache settings. Please click on Settings > WP Super Cache on the left menu bar.

Scroll down the page a little and you will see the “Delete Cache” button. Once you have cleared the cache OptiMonk should start appearing.

How to synchronize it with your WooCommerce platform

If you’re store runs on the WooCommerce platform, in order to synchronize the product catalog, further confirmation is required after logging in. To do that, please do the following:

1) Log in to your account at https://app.optimonk.com/

2) Go to Settings by first selecting your account info on the navbar.

OptiMonk Admin - Google Chrome 2025-08-28 09.14.43 (2).png

3) Go to Insert code, select your domain and click on Next.

OptiMonk Admin - Google Chrome 2025-09-02 13.45.52.png

4) Go to step 4, and look for the Login button. Click the "Login" button, then enter your username and password.

image.png

4.b) If you were unable to log in for some reason, find the WooCommerce option in your WordPress admin, and click on Settings.

Képernyőkép 2025-09-02 140038.png

Look for the Advanced option, and find the Rest API setup.

WooCommerce settings ‹ woocommersetest — WordPress.png

Add a new Rest API key by clicking in Add new.

WooCommerce settings ‹ woocommersetest — WordPress (1).png

Name your API key, choose the owner and select the acces type of the key (Read, Write or Read/Write). If you’re finished, generate the API key.

WooCommerce settings ‹ woocommersetest — WordPress2.png

If you have generated the key, paste the Consumer key and the Consumer secret in your OptiMonk account, under the Log in button.

OptiMonk Admin - Google Chrome 2025-09-02 14.25.48.png

Finish the integration setting by clicking on Save.

OptiMonk Admin - Google Chrome 2025-09-02 14.31.24.png

Congratulations, you can start using OptiMonk on your website!

If you need any further help or have any questions, just let us know at support@optimonk.com and we would be happy to assist :)

Did this answer your question?