Shopify Flow/Order Tagging & Segmentation/Tag Orders by First Visit Landing Page URL Path
Operational EfficiencyMedium Difficulty

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

  1. Trigger

    Step 1

    Starts when a new order is created.

  2. Wait

    Step 2

    Waits 5 minutes for the customer journey summary to be ready.

  3. Condition

    Step 3

    Checks if the landing page URL includes a certain string.

  4. Action

    Step 4

    Adds your desired tags.

Step-by-Step Setup

  1. 1

    Start a new Flow with the 'Order created' trigger.

  2. 2

    Add a 'Wait' action for '5 minutes' to allow customer journey data to populate.

  3. 3

    Insert a 'Condition' and select 'Order' then 'First visit landing page URL'. Set it to 'contains' your desired string (e.g., 'fr').

  4. 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.

Open Shopify Flow

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