Build a customer-aware landing gate that checks order history on page load and branches the experience. New or unauthenticated visitors see the offer page. Returning customers with at least one historical order get redirected to the main shop. Track redemptions with Shopify Flow tags so the merchant can measure campaign ROI and exclude repeat buyers from future PPC targeting.
A DTC merchant running paid acquisition campaigns wanted to segment traffic by purchase history and surface a dedicated landing experience only to first-time customers. Repeat visitors and logged-in returning customers were being routed to the same offer page, wasting ad spend and muddying campaign performance metrics.
Four pieces
Storefront
New Customer Detector
Checks if the logged-in customer has ever placed an order; if not, shows the offer page—if yes, redirects to the main shop. Runs on every page load.
Theme app extension
theme/snippets/first-time-gate.liquidliquid
{% if customer %}
{% if customer.orders_count == 0 %}
<!-- New customer: show the offer page -->
<div class="offer-container">
<h1>Exclusive First-Time Offer</h1>
<!-- Your landing page content here -->
</div>
{% else %}
<!-- Returning customer: redirect -->
<script>
window.location.href = '/';
</script>
{% endif %}
{% else %}
<!-- Not logged in: show offer (they may buy as guest or log in) -->
<div class="offer-container">
<h1>Exclusive First-Time Offer</h1>
</div>
{% endif %}
Place this snippet in the landing page template; it runs on every load.
Storefront
Offer Landing Page
A custom page template with a product, promotional copy, and cart button designed to convert first-time buyers.
Replace 'your-product-handle' with your actual product handle.
Operations
Offer Redemption Tag
Automatically tags a customer the moment they complete their first purchase, enabling campaign performance tracking and preventing duplicate offers.
Shopify Flow
Shopify Flow editor: When → Thenflow
Trigger: Order created
Condition: Customer's order count equals 1 (first order)
Then: Tag customer with "first-time-offer-redeemed"
Then: Add customer to Shopify segment "First-Time Offer Customers"
Then: Send notification (optional): "Congratulate them via email using Klaviyo or your ESP"
Enables you to track campaign performance and prevent double-offers.
Operations
PPC Pixel & Redirect
Fires a custom event when a first-time visitor arrives and routes repeat customers away from the offer, preventing ad spend waste on returning buyers.
Theme script + GTM
Got a similar problem?
Sketch your build in 30 seconds — voice, type, or attach a screenshot.