Target Based On Product

Target Based On Product

Targeting your visitors based on their cart contents.

Target Based On Product is an OptiMonk targeting condition that shows or hides campaigns based on specific products in a visitor's shopping cart. Rather than targeting all visitors indiscriminately, you can show a campaign only when a visitor has added a particular product, a product from a specific collection, or a product matching certain attributes — such as a brand, tag, or price range — to their cart. On Shopify and Shoprenter, you can select products directly from your catalog browser inside OptiMonk. On WordPress, WooCommerce, Magento, and other platforms, you define rules by product name, ID, SKU, or other text-based properties. You can also combine include and exclude logic — for example, show the campaign to visitors who have a dog product in their cart but not a cat product — to build precise targeting scenarios without duplicating campaigns.

Key benefits

  • Product-specific relevance without campaign duplication: Instead of creating a separate campaign for every product or category, you configure targeting rules that automatically match the right campaign to the right cart contents. A single cross-sell campaign can fire for all visitors who have Product A in their cart, regardless of what else they are browsing.
  • Catalog browser for Shopify and Shoprenter: On Shopify and Shoprenter, you select products directly from a searchable catalog within OptiMonk — no need to look up product IDs or copy URLs. For multi-attribute targeting, you can filter by collection, product type, vendor, tag, price, or availability, covering complex targeting needs through a visual interface.
  • Include and exclude logic for surgical precision: Beyond "show this campaign if product X is in the cart," you can add a second rule to exclude specific products — for example, show the campaign to visitors who have any dog food in their cart but exclude those who already have the premium bundle. This composable logic replaces many separate campaigns with one flexible rule.

How it works

Step 1
Open cart rules and select "Products in the cart"

In your campaign's targeting settings, click Add new rule, select Cart rules, and then choose the "Products in the cart" condition from the available options.

Step 2
Define your product rule

On Shopify or Shoprenter, use the catalog browser to select specific products by name, or set attribute-based rules (collection, type, vendor, tag, price, availability). On other platforms, type in a product identifier — name, ID, SKU, or category and set the matching logic to "equals," "contains," "starts with," or "ends with." Add an exclude rule if needed.

Step 3
Combine with other rules and publish

Add additional conditions if needed. Once published, OptiMonk checks the visitor's cart contents each time the campaign trigger fires and displays the popup only to visitors whose cart matches your product rule.

Frequently asked questions

What is Target Based On Product in OptiMonk?+

Target Based On Product is an OptiMonk Cart Rule condition that shows or hides a campaign based on whether specific products are present in a visitor's shopping cart. You define which products or product attributes should trigger the campaign, and OptiMonk checks the visitor's cart contents in real time. It works on Shopify, Shoprenter, WordPress, WooCommerce, Magento, and other platforms.

Does this work if I have thousands of products?+

Yes. On Shopify and Shoprenter, OptiMonk provides a searchable catalog browser inside the targeting settings, so you can find any product by name quickly without scrolling through a full list. You can also use attribute-based rules — such as "product collection contains 'summer'" — to target entire groups of products with a single rule.

Can I target visitors who do NOT have a specific product in their cart?+

Yes. The product cart rule supports both "include" and "exclude" logic. You can create a rule that shows a campaign to visitors who have Product A in their cart but exclude those who also have Product B — for example, to cross-sell only to visitors who do not already have the complementary item. Multiple rules are combined with AND logic.

How do I set up product targeting on WooCommerce or Magento?+

On platforms other than Shopify and Shoprenter, there is no visual catalog browser. You define the rule by typing in a product property — name, product ID, SKU, or category. You can set the matching logic to "equals," "contains," "starts with," or "ends with" to match single products or groups. OptiMonk's cart detection works automatically on WordPress, WooCommerce, and Magento after installation.

Can I combine product-based targeting with cart value targeting?+

Yes. You can stack a "Products in the cart" condition with a "Cart value" condition in the same campaign using AND logic. For example, you can show a campaign only to visitors who have a specific product in their cart AND whose cart total is above $40 — combining product relevance with purchase intent signals in a single rule set.

Ready to try it?

Try OptiMonk for free

Launch your first campaign, learn what works, then scale what converts.

ecommerce