Recently viewed products

The Recently Viewed Products section is a custom preset designed to display a list of products that the user has recently visited. It helps re-engage users by showing items they’ve already expressed interest in.

This section is implemented using JavaScript and cookies.


How to Configure the Recently Viewed Products

  1. In Shopify admin, go to Online Store → Themes.

  2. Click Customize next to the Elemento theme.

  3. In the theme editor, navigate to the Product page.

  4. In the left sidebar, click Add section, then select Recently Viewed Products, or locate it if it’s already added.

  5. Customize the layout, heading, and number of products displayed.

  6. You can drag and drop this section to reorder it on the page.

  7. Click Save.

Section Settings

Setting
Type
Description

Heading

Text

Title displayed above the product list (e.g., “Your Recently Viewed”).

Maximum products to show

Range

Sets how many recently viewed products to display.

Image ratio

Select

Controls the aspect ratio of product images. Options: Adapt to image, Portrait, Square.

Color scheme

Preset selection

Defines the visual style of the section.

Section Padding

Device
Setting
Type
Description

Desktop

Top padding

Range

Space above the section on desktop view.

Desktop

Bottom padding

Range

Space below the section on desktop view.

Mobile

Top padding

Range

Space above the section on mobile view.

Mobile

Bottom padding

Range

Space below the section on mobile view.


Behavior and Implementation

  • This section tracks products visited using a browser cookie and stores a list of product handles or IDs.

  • When the user returns to a page with this section, the list is retrieved and rendered dynamically using JavaScript.

  • Works across all product pages and retains product order based on most recent views.

  • No need for Shopify app configuration or theme settings beyond section insertion.