Tag Orders by First Visit Landing Page URL Path
Automatically tags orders when a customer's first visit landing page URL includes a specific string, enabling precise segmentation and personalization.
The Problem
Manually sifting through customer journey data to identify orders originating from specific marketing campaigns, language versions, or regional landing pages is incredibly time-consuming and prone to error. This oversight leads to generic marketing, missed upsell opportunities, and inefficient customer support, costing valuable time and diminishing customer lifetime value.
What This Automation Solves
This Shopify Flow automation triggers immediately upon "Order created," then strategically employs a "Wait" step for 5 minutes to ensure the customer journey summary data, including the first visit landing page, is fully available. A subsequent "Condition" checks if the 'First visit landing page URL' contains your specified string (e.g., 'fr'), and if true, an "Add order tags" action applies your chosen tag for instant, accurate segmentation.
When to Use This Automation
- Segment customers who initially landed on your French-language storefront (e.g., URL contains '/fr').
- Identify orders originating from a specific marketing campaign that used a unique URL parameter or path.
- Categorize customers who first discovered your site through a particular product category or collection page.
Workflow
Trigger
Step 1Starts when a new order is created.
Wait
Step 2Waits 5 minutes for the customer journey summary to be ready.
Condition
Step 3Checks if the landing page URL includes a certain string.
Action
Step 4Adds your desired tags.
Step-by-Step Setup
- 1
Start a new Flow with the 'Order created' trigger.
- 2
Add a 'Wait' action for '5 minutes' to allow customer journey data to populate.
- 3
Insert a 'Condition' and select 'Order' then 'First visit landing page URL'. Set it to 'contains' your desired string (e.g., 'fr').
- 4
Under the 'Then' branch of the condition, add an 'Add order tags' action and input your specific tag (e.g., 'First-Visit-FR', 'Campaign-XYZ').
Related Questions
- Why is a 'Wait' step necessary for this automation?
- The customer's first visit landing page data, which is part of their journey summary, can take a few minutes to fully process and attach to the order. The 'Wait' step ensures this data is available and accurate before the Flow attempts to evaluate the condition.
- Can I check for multiple different URL paths in one Flow?
- Yes, you can extend the 'Condition' by adding 'AND' or 'OR' clauses to check for multiple strings, or by nesting 'If/Else' conditions. For more complex scenarios, you might duplicate the Flow for each unique path you want to tag.
- What kind of strings should I use in the URL path condition?
- Focus on unique, persistent elements of your landing page URLs. This could be a language directory ('/fr/'), a specific campaign parameter ('?source=summerpromo'), or a unique product/collection handle ('/collections/new-arrivals').
- How can I use these tags for marketing after the Flow runs?
- These tags allow you to create dynamic customer segments in your email marketing platform (like Klaviyo). You can then send highly targeted follow-up campaigns, offer specific promotions, or provide localized content to customers based on their initial entry point to your store.
Recommended Tools & Apps
Launch this automation
Open Shopify Flow and use this page as your setup blueprint.
Merchant Insight
Leverage these landing page tags to create hyper-personalized post-purchase experiences. For example, if a customer landed on your French site, queue up a follow-up email sequence in French, or recommend products from a collection they view
Related Automations
Tag & Prioritize High-Value Orders Automatically with Flow
Automatically identify and tag orders above a custom threshold, enabling your team to prioritize high-revenue customers for expedited processing and support.
Automate Repeat Customer Tagging for Smarter Segmentation
Automatically identify and tag loyal shoppers after their second purchase, streamlining segmentation for personalized marketing and service.
How to Automatically Tag Orders Using a Discount Code
Automatically segment your orders by applying a 'Discounted' tag whenever a customer uses a promotional code, simplifying reporting and future marketing efforts.