> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.upsellplus.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How to bring back recently viewed products in cart and checkout

**Recently viewed offers bring back products a shopper looked at but didn't add.** UpsellPlus remembers the products each shopper viewed during their visit and shows them again in the cart and at checkout, most recent first, with an optional discount to close the sale.

- **Where:** Offers → Create Offer → **Offers** tab → **Automatic** → **Recently viewed**
- **Works on:** cart placements (Cart Page, Cart Drawer, Cart Widget, Cart Popup) and checkout placements
- **Requires:** the **Traffic & Browsing Data** app embed turned on in your theme


![Products viewed during the visit brought back at checkout with an optional discount](https://storage.crisp.chat/users/helpdesk/website/-/a/b/f/a/abfa0cd47f75e80/recently-viewed-recovery-check_v42w6j.png)

## Before you start: turn on browsing tracking

UpsellPlus can only remember viewed products when the **Traffic & Browsing Data** app embed is on:

1. In Shopify admin, go to **Online Store → Themes → Customize**.
2. Open **App embeds** and turn on **Traffic & Browsing Data**.
3. Save.

The offer editor shows **Browsing tracking active** when it's working, or **Browsing tracking disabled** with an **Enable in theme editor** link if it isn't.

## Set up the offer

1. Go to **Offers → Create Offer** and choose a cart or checkout placement.
2. On the **Offers** tab, under **How should products be selected?**, choose **Automatic**, then **Recently viewed**.
3. Optional: add a discount to encourage the purchase.
4. Optional: narrow results with filters (collections, tags, product types).
5. Edit the message. Available token: `{product_name}`.
6. Save.

**Shortcut:** on the **Collections** page, products that get clicked but not bought have a **Create a recently viewed offer** button.

## How it works

- Shows the products this shopper viewed during their visit, **most recent first**.
- Skips products that are **already in the cart**, **out of stock** or **unpublished**.
- If there's nothing to show, the **next offer in priority** shows instead, so the placement isn't left empty.

## Use recently viewed as a fallback for other offers

Other ShopBrain offer types (like Similar Products) normally base their recommendations on the cart or the product being viewed. Turn on **Fall back to recently viewed products** to use the shopper's recently viewed products as the starting point when there's no cart or product view yet.

## FAQ

**Does it work on product pages or after checkout?**
No. Recently viewed offers work in cart and checkout placements only.

**Why isn't my recently viewed offer showing?**
Check that the Traffic & Browsing Data app embed is on, and that the shopper viewed products this visit that aren't already in the cart, out of stock or unpublished.

**Do I have to add a discount?**
No. The discount is optional.

**How long does UpsellPlus remember viewed products?**
For the shopper's current visit.

## Related articles

- [What is ShopBrain? Automatic product recommendations in UpsellPlus](https://help.upsellplus.com/en/article/what-is-shopbrain-automatic-product-recommendations-1hl2sgl/)
- [How to set priority for your upsell offers](https://help.upsellplus.com/en/article/how-to-set-priority-for-your-upsell-offers-md199q/)
- [Why is my upsell offer not showing?](https://help.upsellplus.com/en/article/why-is-my-upsell-offer-not-showing-1emt453/)