# Product Recommendations: Last visited products

Canonical URL: https://support.optimonk.com/en/articles/product-recommendations-recently-viewed-products

**Last visited** is one of the dynamic modes of the product recommender. The popup shows the products *this* visitor has just been looking at, so they can pick up the purchase where they left off. Personalised, per visitor, with nothing to maintain on your side.

**Before you start:** this mode needs your store connected to OptiMonk. Until then it is greyed out in the Mode dropdown with the hint **store needed** — see *Connect your store* below.

---

## Set the mode to Last visited

1. Open **Campaigns** in the left menu and click the campaign that has the product cards.
2. On the **Overview** tab, click the version's preview image or its name. The popup editor opens.
3. Click the product row in the popup. The panel on the right opens on the product component.
4. Open the **Mode** dropdown and pick **Last visited**.
5. Check **Open the product in a new tab** if you want the card's link to open in a new tab.
6. Click **Save** in the top right corner (or **Save & Exit** to close the editor at the same time).

From here the runtime fills the cards at display time. The products you see in the editor are only stand-ins — each visitor gets their own.

---

## Connect your store

Until your store is connected, **Last visited** cannot be selected. The panel says why:

*The dynamic modes need your store connected to OptiMonk.* **Why?
***Most viewed, Last visited, Products in the cart and Smart recommendation each pick the products live, from your store's own data. Without that connection the popup would have nothing to fill the cards with, and OptiMonk hides the whole campaign rather than showing empty ones.
*

To connect it, open **Settings → Domains**, find the domain the campaign runs on and click **Connection guide**. The guide is written for your platform:

- **Shopify** — install the OptiMonk app, then switch the **OptiMonk app embed** on in your theme.
- **WooCommerce** — connect in one click, or paste the consumer key and secret by hand.
- **Unas / Gomag / MerchantPro** — the last step of the guide asks for an **API key**, which is what lets OptiMonk read your catalog.

Once the connection is live, reopen the editor and **Last visited** is selectable.

---

## Good to know

- **Only in-stock products are recommended.** If the visitor has not browsed enough products to fill every card, OptiMonk hides the campaign rather than showing empty cards — so a wider card row is a stricter condition.
- **The number of cards comes from the design**, not from a setting — the panel says *{count} product card(s) — from the design*. To show a different number of products, ask for it in chat and the popup is rebuilt.
- **Don't type over the cards on the canvas.** In a dynamic mode the runtime fills the cards at display time, so a name or price typed over on the canvas is discarded.
- **Pair it with the right trigger.** Last visited works best on an exit-intent or an inactivity trigger, where the visitor has already browsed a few products. You set triggers on the campaign's **Settings** tab, or just ask for them in chat.
