How to Show Returning Customers a Different Homepage on Shopify

How to show returning customers and returning visitors a different homepage on Shopify: the native Liquid route with customer.orders_count and tags, why it misses shoppers who aren't logged in, what customer segments and Klaviyo can and can't do, and how to cover anonymous returning visitors.

Short answer

Natively, you show returning customers a different homepage with theme Liquid: wrap content in a check such as {% if customer and customer.orders_count > 0 %}. The limit is that Shopify's customer object is empty unless the shopper is logged in, so returning visitors who browse as guests see the default homepage, and visitors who never bought have no customer record at all. Shopify customer segments are built for marketing, not storefront rendering. To reach anonymous returning visitors, you need tracking that recognizes the browser itself, plus a way to send that segment to a different version of the page.

If you want to show returning customers a different homepage on Shopify, the usual answer is theme Liquid: check the logged-in customer's order count (customer.orders_count) or tags and render different content. That works, with one large catch. Your theme only knows who a returning customer is when they're logged in, and many people who come back to your store aren't. Customer segments don't fill the gap either, because they're built for marketing, not for rendering the storefront.

This guide covers the native Liquid route with code, its limits, what Shopify and Klaviyo can know about anonymous visitors, and how to segment Shopify visitors who aren't logged in. Everything is checked against Shopify's and Klaviyo's documentation as of November 2026.

First, decide what "returning" means

"Returning" means three different things, and each one is known by a different system:

Who Definition Who knows it Can it change your homepage natively?
Returning customer Has placed at least one order Shopify, but on the storefront only if they're logged in Yes, with Liquid, for logged-in customers
Returning visitor Has been to your store before, bought or not Analytics tools that recognize the browser No
Identified subscriber Clicked an email or SMS, filled in a form, or logged in Your email platform (for example Klaviyo) Only through the email platform's own banners or blocks

Shopify's New vs returning customers report defines a returning customer as "a customer who placed an order, and whose order history already includes at least one order." Its analytics field reference applies the "new or returning" label to orders and customers, while visitors are counted as "unique visitors (one visitor can visit multiple times)."

Returning visitors are the bigger and more valuable group. Contentsquare's 2026 benchmark, built on 99 billion sessions across 6,000 sites, puts the conversion rate of returning visitors at 2.9% against 1.7% for new visitors. Shopify's own guide to the metric says a good returning visitor rate for ecommerce is around 30%. Many of those visitors have never ordered, so they aren't returning customers at all. For more context, see our Shopify conversion rate benchmarks.

The native route: Liquid and the customer object

Shopify themes are written in Liquid, and Liquid has a customer object. The properties that matter here:

  • customer.orders_count: "The total number of orders that the customer has placed."
  • customer.tags: "The tags associated with the customer," such as vip or wholesale.
  • customer.total_spent: the total spent across all orders, in the currency's subunit (cents for USD).

The simplest place to use them is a Custom Liquid section on the homepage, if your theme offers one. Shopify notes that theme settings of type liquid can use global Liquid objects, and customer is a global object when a shopper is logged in. Add the section in the theme editor and paste something like this:

{% if customer and customer.orders_count > 0 %}
  <div class="page-width">
    <h2>New since your last order</h2>
    <p>Restocks, new arrivals and the best sellers our repeat customers buy most.</p>
    <a class="button" href="/collections/new-arrivals">See what's new</a>
  </div>
{% elsif customer %}
  <div class="page-width">
    <h2>Ready for your first order?</h2>
    <a class="button" href="/collections/best-sellers">Shop best sellers</a>
  </div>
{% endif %}

To target a tag instead of an order count, use {% if customer.tags contains 'vip' %}. Guests see nothing from this section, so the rest of your homepage stays their default.

Two practical limits of the Liquid route:

  • It adds content; it doesn't swap the page. A Custom Liquid section renders its own block. Hiding your existing hero or reordering sections for returning customers means editing section files in the code editor, and that change applies everywhere the section is used.
  • It needs a developer to maintain. Every new segment is another branch in your theme code, with no built-in way to measure whether it sells more than the default.

The big limit: the customer object is empty for guests

Shopify's documentation is direct: the customer object is "directly accessible globally when a customer is logged in to their account," and outside a few account and order contexts, "if the customer isn't logged into their account, the customer object returns nil."

That rules out most returning traffic:

  • Customers can buy without an account. The same page notes that "a customer can complete a checkout without making an account with the store." A guest who ordered last month and comes back today is a stranger to your theme.
  • Past customers have to sign in again on that device. With customer accounts, shoppers sign in with a one-time 6-digit code sent to their email, and Shopify says sign-in sessions "persist for up to 365 days." That helps people who sign in, but someone browsing from their phone after ordering on a laptop is a guest until they sign in there.
  • Returning visitors who never bought have no customer record. Shopify creates a customer profile when someone signs up for your mailing list or an account, places an order, or abandons a checkout. A browser who looked at three products last week and left isn't a customer at all.

One more caution if you use new customer accounts: on Shopify's developer forum, theme developers have reported the storefront customer object returning null for shoppers who had signed in, with reports continuing into 2026 after a fix in 2025. Test your conditions while signed in on a real device before you rely on them.

Shopify customer segments: built for marketing, not the storefront

Shopify customer segments group customers by filters such as orders, amount spent, location and subscription status. According to Shopify's segment management docs, you use a segment to send an email campaign through Shopify Messaging, create a discount for that segment, export it to CSV, or let an app use it.

None of that changes what your homepage renders. The Liquid customer object's listed properties include tags, order count and amount spent, but no segment. And segments are made of customer profiles, so they can't include anonymous visitors. If you need a segment inside the theme, the workaround is to mirror it as a customer tag, which brings you back to the logged-in limit.

What Shopify can and can't know about anonymous visitors

Shopify does track anonymous visitors, just not in a way your theme can act on:

  • Analytics counts them. Shopify Analytics recognizes browsers to count visitors and sessions. In regions where your store asks for consent, Shopify doesn't set analytics cookies until the visitor accepts.
  • The Customer Privacy API reports consent. The Customer Privacy API lets code check whether analytics, marketing and preferences processing are allowed. "For regions that are configured to require consent, non-essential purposes are not allowed by default until consent is given."
  • Web Pixels see customer events but can't change the page. Web pixels subscribe to customer events such as page_viewed and product_viewed. They run in a sandbox: app pixels in a web worker, custom pixels in a sandboxed iframe. Shopify says features that rely on "scraping the DOM for information or attempting to write to the DOM" won't work there. Shopify also stopped setting its _shopify_y and _shopify_s cookies starting January 1, 2026, and points developers to the pixel clientId instead.

So a pixel can record that a browser has been here before, but it can't use that to show a different homepage. Anything that changes the page has to run in the theme or an app embed.

What Klaviyo can do for returning visitors

Klaviyo can recognize some returning shoppers who aren't logged in, but only ones it has identified. Per Klaviyo's help center, onsite tracking records "Active on Site" and "Viewed Product" for identifiable browsers: people who clicked a Klaviyo email or SMS, submitted a Klaviyo form or their email or phone number, or logged in. On Shopify, Klaviyo "may not track onsite events for visitors to your Shopify store in the EU, EEA, UK and Switzerland, unless they have provided consent."

Klaviyo's identifying cookie lasts up to 2 years. With anonymous visitor activity backfill, Klaviyo queues an unidentified visitor's events in browser local storage and attaches them to the profile once that browser is identified. How long they survive depends on the browser; Klaviyo notes Safari can clear a site's local storage after 7 days without interaction.

On the storefront itself, Klaviyo's personalized onsite banners can target segments and choose between "All shoppers," "Logged in shoppers only," or "Logged in or recognized shoppers." They require Customer Hub and load at the top of the site. They add a banner; they don't give a segment a different homepage. We cover the rest of Klaviyo's onsite tools in Klaviyo-style flows on your website.

What a returning-visitor homepage should change

Whichever route you take, the version only helps if it's built for what each group needs. A starting point:

Homepage element First visit Returning visitor (hasn't bought) Returning customer
Hero What you sell and why it's different The product or category they're most likely to want, plus the main objection answered New arrivals, restocks, or the next product in the range
Proof Reviews, press, guarantees Specific proof: reviews on best sellers, comparisons, FAQs Less proof; they already trust you
Offer First-order incentive if you use one A reason to decide now, such as free shipping thresholds Bundles, add-ons, loyalty or subscription options
Navigation Best sellers and the core collection Shortcuts back into the collections people browse most Shortcuts to replenishable products and new drops
Main CTA "Shop best sellers" "Pick up where you left off" (category-level) "See what's new"

Change what the segment actually needs, not just the headline, and test every version against the default homepage: a returning-visitor homepage can lose if it hides products people came back for. The same thinking applies to product pages; see our guides to a product page for cold traffic and a different product page for Meta ads.

How to segment Shopify visitors who aren't logged in

To show returning visitors a different homepage when they aren't logged in, you need two things Shopify doesn't provide together: tracking that recognizes the browser across visits, and a way to render a different page for that segment. Your options:

  1. Custom code. A developer sets a first-party flag on the first visit and reads it on the next, then shows or hides content. It has to respect the Customer Privacy API in consent regions, and content swapped after the page loads can visibly flash. You also have to build your own measurement.
  2. Your email platform. Klaviyo's banners and blocks can target recognized browsers. That covers subscribers and email clickers, not the larger anonymous group.
  3. A personalization app. Apps differ on whether they recognize anonymous visitors, whether they change whole pages or insert widgets, and whether they measure against the original. We compare them in the best Shopify personalization apps.

Ariven is one way to cover anonymous returning visitors. You build a returning-visitor version of your homepage in the Shopify theme editor. (Shopify's own alternate templates don't cover the homepage, but Ariven can route a segment to a homepage version.) Then you create a flow in Ariven that says which segment sees it: first visit, returning visitor, returning customer, a Klaviyo segment, a specific campaign, or a traffic source. Ariven routes each visitor in that segment to your version on the same URL, and everyone else sees the original. Segments come from Ariven's own first-party tracking, so they work for visitors who aren't logged in, and repeat visits are linked into one journey.

A few specifics. Versions are segment-level, not one-to-one: every returning visitor in the segment sees the same page you built. Alternate pages are set to noindex so they don't compete with your homepage in search. Ariven installs as a standard Shopify app embed with no theme code edits, and your alternate pages are native Shopify pages that stay in your theme if you uninstall. Each flow is measured against the original page as an A/B test. In our own randomized A/B test on a founder-owned store, three flows split 50/50 against the original lifted measured store sales by 9%, which projects to 18% with all traffic included. Results vary by store.

Where to start

  1. Size each group. In Shopify's reports, check how many orders come from returning customers. In your analytics, check how many visitors come back without buying. If you've connected Shopify to ChatGPT or Claude, you can ask it to break this down for you.
  2. Pick one group and one change. Logged-in repeat customers are easy to reach with Liquid. Anonymous returning visitors are usually the larger group.
  3. Build the version and measure it. Compare conversion rate and revenue per visitor for that segment against the default homepage, then keep, change or drop it.

If you send paid traffic straight to the homepage, a dedicated landing page is often a better fit for that first visit.

Sources

Frequently asked questions

Can Shopify show a different homepage to returning customers without an app?

Yes, but only for customers who are logged in. Theme Liquid can check customer.orders_count or customer.tags and show different content, for example in a Custom Liquid section on the homepage. The customer object is empty for shoppers who aren't signed in, so guests and visitors who have never bought always see the default version.

What is customer.orders_count in Shopify Liquid?

customer.orders_count is a property of the Liquid customer object that returns the total number of orders the customer has placed. It is only available when the customer object exists, which on most storefront pages means the shopper is logged in to their account. A check such as {% if customer and customer.orders_count > 0 %} identifies a logged-in customer who has ordered before.

Can I use Shopify customer segments to personalize my storefront?

Not directly. Shopify's documentation describes segments for marketing: email campaigns through Shopify Messaging, segment-targeted discounts, exports and apps that read segments. The Liquid customer object has no segment property, and segments only contain customer profiles, so anonymous visitors are never in them.

How do I segment Shopify visitors who are not logged in?

You need tracking that recognizes the browser rather than the customer account. Shopify's own analytics and Web Pixels can observe anonymous visitors, but pixels run in a sandbox and can't change the page. Klaviyo recognizes browsers that clicked an email or SMS, submitted a form or logged in. To cover everyone else, use an app with its own first-party visitor tracking that can also route each segment to a page version built for it.

What is the difference between a returning customer and a returning visitor?

A returning customer has placed at least one order before. A returning visitor has been to your store before, whether or not they bought. Shopify's reports define returning customers by order history. Returning visitors are a larger group that includes everyone who browsed, left and came back without buying.