🔥 Just Launched! Werra Premium Template for HyväSee it in Action

How to Show Recently Viewed Products in Magento 2

By Sanjay JethvaUpdated on Jun 09, 2025 4 min read

E-commerce stores face fierce competition and therefore do not leave any stones unturned to offer the best shopping experience and services.

Magento 2 stores are no exception and hence I’ve come up with a tactic that has proved effective for enhancing the shopping experience. Implement the below method to show recently viewed products in Magento 2 and make it easy for customers to find their interested products.

The feature to display recently viewed products in Magento 2 store help customers find the products they might have viewed and kept the purchase on hold due to some reasons. Also, they might want to compare the previously viewed products with new products to make a purchase decision. Whatever the reasons may be, searching those products from category page or browsing through the store can be irritating. Hence make it easy for them with the feature to display previously viewed products in Magento 2 store!

The widget settings are to be configured in order to show recently viewed products in Magento 2. Check the stepwise method for the same.

Method to Show Recently Viewed Products in Magento 2 Pages:

1. Navigate to Admin Panel > Content > Widgets.

1_Menu

2. Create a new widget instance with the “Add Widget” button.

2_Add New Widget

3. Select the Type and Design Theme from the drop-down in Settings for the widget.

3_Settings

4. Click Continue.

5. Once redirected to StoreFront Properties, name the widget instance title, assign the store views and enter the sort order.

4_Storefront Properties

6. Moving forward to Layout Updates, select the page and container from the drop-down options.

5_Add Layout Update

7. Select the page

6_Layout Update-Page

8. Select the container

7_Layout Update-Container

9. Navigate to Admin Panel > Content > Widgets > Widget Options under widget.

10. Enter the number of products and select its attributes to be shown. Also, choose the buttons to be displayed in the frontend for the widget.

11. Save the configuration and Flush Magento Cache.

8_Widget Options

12. The Recently Viewed Products widget is added as shown here:

9_Widget Grid

Following the above steps, you’d be able to show recently viewed products in Magento 2 store for your customers! Enhance the shopping experience and hence improve sales.

You can also try the programmatic method to display recently viewed products in Magento 2.

You can also refer to Show Recently Viewed Products in Magento 2 from our Magento 2 video tutorial series:

Thank You.

Sanjay Jethva Full Image
Article bySanjay Jethva

Sanjay is the co-founder and CTO of Meetanshi with hands-on expertise with Magento since 2011. He specializes in complex development, integrations, extensions, and customizations. Sanjay is one the top 50 contributor to the Magento community and is recognized by Adobe. His passion for Magento 2 and Shopify solutions has made him a trusted source for businesses seeking to optimize their online stores. He loves sharing technical solutions related to Magento 2 & Shopify.