Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitchesCookie retargeting in WordPress lets you change what a visitor sees after an earlier action on your site. You can replace a closed popup with a quieter reminder, or show a cart-related message when a cookie indicates that items remain in the visitor’s cart. The workflow below uses OptinMonster’s WordPress connector as a worked example; it is not evidence that OptinMonster is the best or only campaign tool.
On-site retargeting happens while the visitor continues browsing your domain. Off-site retargeting uses information collected on your site to show advertising on another platform after the visitor leaves. This guide covers the on-site case.
What cookie retargeting can do on your site
A campaign can react to a previous interaction instead of treating every page view as a first visit. Typical sequences include:
- A visitor closes a large lightbox, then sees a less intrusive floating bar with a different offer.
- A visitor has a product-related cookie, then sees a cross-sell or cart reminder.
- A visitor who has already dismissed one lead magnet receives an alternative resource rather than the same form.
These rules personalize presentation; they do not prove that a visitor will convert. The reviewed sources contain no conversion-lift percentage, so avoid promising a guaranteed sales increase.
#1 Best Overall
Before you build: identify the signal and the permission
Choose the interaction you want to remember
Write down the exact event that should change the next message: closing campaign A, having a particular cookie, or merely having a cookie present. A rule is only as reliable as the event represented by that signal.
Separate necessary WordPress cookies from marketing cookies
WordPress core uses cookies for functions such as authentication, logged-in status, interface preferences, commenter convenience, browser-cookie testing, and language selection. A cookie’s presence alone does not make it a marketing or retargeting cookie.
Review every campaign and consent plugin for cookies, local storage, personal-data collection, external scripts, pixels or iframes, data sharing, retention, and access or deletion tools. WordPress’s Plugin Handbook calls for clear, specific, informed choices, purpose limitation, data minimization, and transparency. The requirements that apply depend on visitor location, your purposes, and your implementation.
Rank #2
Do not treat the WP Consent API as a consent banner
WordPress’s WP Consent API is an interoperability layer. It standardizes how compatible plugins register and read consent categories, but the plugin documentation warns: “the plugin itself will not handle consent.” You still need a consent-management plugin and a second plugin that supports the API. Third-party JavaScript may need separate blocking, and PHP-set cookies may not be stopped by script blocking alone.
Recommended Free Tools
The API’s marketing category covers storage or access used to create advertising profiles or track users on one or multiple websites. Do not assume that a marketing cookie qualifies as strictly necessary.
Worked setup: connect WordPress to OptinMonster
1. Connect the site
- Create an OptinMonster account.
- In WordPress, install and activate the OptinMonster plugin.
- Use the plugin’s connection flow to link the site to the OptinMonster account. The plugin acts as a connector to the OptinMonster application.
The tutorial used for this sequence says its Growth plan unlocks advanced features such as cookie retargeting and follow-up campaigns. Plan names, prices, and feature availability can change, so check the vendor’s current plan details before buying or documenting this as a requirement.
2. Build and publish the first campaign
- In the WordPress admin, open OptinMonster > Campaigns.
- Create a campaign and choose a campaign type and template. The tutorial’s example uses a lightbox popup.
- Edit the design in the drag-and-drop builder.
- Set display rules for the first message. Available examples include time on page, location, and exit intent.
- Publish the campaign and save it.
The tutorial describes a default that displays after five seconds on pages, but defaults are changeable and should not be treated as a current guaranteed setting. Confirm the rules shown in your builder.
Show a different message after a visitor closes the first one
Use a “Has Closed” follow-up rule
- Create a second campaign. The worked example uses a floating bar, which is less intrusive than another full popup.
- Open its Display Rules.
- Choose Personalization > Has Closed.
- Select the first campaign as the campaign the visitor must have closed.
- Give the follow-up a genuinely different purpose, such as a softer offer, coupon, or alternative lead magnet.
- Publish and save the second campaign.
Avoid countdowns or “limited-time” language unless the deadline and inventory are real. The trigger records the earlier interaction; it does not establish urgency.
Free tools Windows power users keep installed
One-click scans. No signup required.
Target a cookie value, such as a cart state
Understand the three operators
| Operator | Use it when | What it tests |
|---|---|---|
| Match exactly | You expect one specific value | The cookie equals the entered value |
| Contain | The cookie may include several products or values | The cookie includes the entered text |
| Exist | Any visitor with the cookie qualifies | The cookie is present, regardless of value |
Configure the rule
- Open the campaign’s Display Rules.
- Choose Targeting (Who) > Cookie Targeting.
- Enter the cookie key (name), its value when required, and the appropriate operator.
- Publish the campaign and save it.
The tutorial’s WooCommerce example uses woocommerce_items_in_cart to target visitors who have products in a cart. Cookie names and values depend on the actual WooCommerce installation, theme, caching, consent setup, and other plugins. Inspect the specific site’s browser storage and confirm the values before relying on this rule. A cart cookie can support a reminder or cross-sell, but it is not proof that checkout will be completed.
Rank #4
Test the experience without fooling yourself
- Open the site in an incognito or private browser window. The tutorial recommends this because administrator cookies can alter what campaigns appear.
- Trigger the first campaign, close it, and visit a page where the follow-up should display.
- In a separate private session, create the cookie condition you are testing and verify the cookie key, value, and operator.
- Check the negative case: remove or change the cookie and confirm that the campaign no longer appears.
- Test consent-denied and consent-granted states if the campaign depends on a non-essential category.
- Check mobile and desktop layouts, frequency limits, cached pages, and logged-in versus logged-out visitors.
OptinMonster also describes A/B split tests that randomly show campaign variants and track conversions. You can vary headlines, offers, images, or targeting, but that workflow is a testing feature—not evidence of a guaranteed improvement.
Choose the right targeting approach
| Approach | Trigger | Best fit | Main check |
|---|---|---|---|
| Follow-up campaign | A visitor closed a named campaign | A softer or alternative message after dismissal | Whether the second message is meaningfully different and less intrusive |
| Cookie-value targeting | A cookie key is present or has a matching value | Cart reminders, cross-sells, or state-based messages | Whether the cookie accurately represents the intended action and has appropriate consent |
The first method depends on the campaign platform’s interaction record. The second depends on a browser value that may be changed, absent, expired, or set differently by another component. Neither approach is a neutral vendor comparison, and the available sources do not establish current pricing or performance differences between campaign products.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Privacy checks for a production campaign
- Document each cookie or storage item, its purpose, duration, and whether it is first- or third-party.
- Identify what personal data leaves WordPress and which outside services receive it.
- Load non-essential scripts only after the visitor’s appropriate consent choice.
- Provide a way to change consent and honor applicable access or deletion requests.
- Set retention periods and remove data when it is no longer needed.
- Describe the purpose in plain language instead of bundling marketing consent into an unrelated necessary function.
Microsoft’s Clarity documentation illustrates why regional checks must be current: it says that, from October 31, 2025, Clarity requires a valid consent signal for full functionality for visits from the EEA, UK, and Switzerland, and names CookieYes for a WordPress integration. That is a Clarity-specific requirement, not a universal rule for every WordPress plugin.
Best Value
Troubleshoot common failures
The follow-up never appears
- Confirm that the visitor closed the selected first campaign, rather than another campaign or browser tab.
- Check campaign priority, scheduling, frequency limits, and page-level display rules.
- Retest in a fresh private window after clearing the old campaign state.
The cookie rule matches the wrong visitors
- Inspect the exact cookie name, capitalization, encoding, and value in the target browser.
- Use match exactly only when the value is stable; use contain for a documented multi-value format.
- Do not infer a cart state from a cookie name copied from another site. Validate it on the current installation.
Consent blocking is incomplete
- Verify that both the consent manager and the campaign plugin support the WP Consent API.
- Check whether the script is loaded by a tag manager, iframe, or another third party that needs separate blocking.
- Check for cookies set by PHP, because browser-side script blocking may not prevent them.
Frequently Asked Questions
What is the difference between on-site and off-site cookie retargeting?
On-site retargeting changes messages while a visitor continues browsing your website. Off-site retargeting uses information from the site to deliver advertising on another platform after the visitor leaves.
Is cookie retargeting automatically legal when the WP Consent API is installed?
No. The WP Consent API coordinates consent signals between compatible plugins but does not collect consent or block every service. Review the cookies, scripts, purposes, retention, and regional requirements for your implementation, and use a consent-management tool where required.
Which cookie should I use for WooCommerce cart targeting?
The worked tutorial uses woocommerce_items_in_cart, but cookie names and values vary by installation. Inspect and validate the actual cookie on your site before creating a rule.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →




