customer-tags shopify segmentation klaviyo marketing-automation

How to Auto-Tag Shopify Customers by Acquisition Source

Detectly Team

Every customer in your Shopify store arrived through some channel — a Meta ad, a Google search, an email campaign, an influencer’s link. But unless you actively capture and store that information, it disappears after the session ends. The customer exists in your database, but you have no idea how they found you.

Customer tagging by acquisition source solves this problem. By automatically tagging each customer with the channel that brought them in, you unlock powerful segmentation capabilities across your entire marketing stack.

Why Customer Tags Matter

Shopify customer tags are simple text labels attached to customer records. They seem basic, but they are one of the most useful data points in the Shopify ecosystem because nearly every marketing tool integrates with them.

Segmentation in Email and SMS Platforms

Klaviyo, Omnisend, Postscript, and other marketing platforms sync Shopify customer tags automatically. Once a customer is tagged with their acquisition source, you can:

  • Send targeted welcome flows. A customer acquired through a Meta ad may need a different welcome sequence than one who found you through organic search. The ad customer has already seen your creative — your welcome email can build on that messaging rather than repeating it.
  • Personalize content by channel. Customers from influencer partnerships may respond to social proof and user-generated content, while customers from Google Search may respond better to product specs and comparisons.
  • Exclude or include segments in campaigns. Running a promotion specifically for customers who were not acquired through a discount channel? Tag-based segmentation makes this straightforward.

Building Better Lookalike Audiences

Meta’s Lookalike Audiences work best when the seed audience is specific and high-quality. Instead of building a lookalike from “all customers,” you can:

  • Build a lookalike from customers tagged as acquired via Meta Ads (these are customers Meta’s algorithm already identified as high-value — a lookalike of this group tends to perform well).
  • Build a separate lookalike from customers acquired via Google Search (these customers had high purchase intent — they were actively searching for your product category).
  • Exclude customers acquired via heavy discounting to focus on full-price buyers.

Retention and Lifetime Value Analysis

Tagging by acquisition source lets you answer critical retention questions:

  • Which channels produce customers with the highest repeat purchase rate?
  • Do customers acquired through influencer partnerships have higher or lower lifetime value than those acquired through paid search?
  • Which channels bring in one-time bargain hunters versus loyal repeat customers?

These insights directly inform how much you should be willing to pay to acquire a customer from each channel.

Shopify Flow Automations

Shopify Flow (available on Shopify Plus, or through the Shopify Flow app on other plans) can trigger automations based on customer tags. Examples:

  • When a customer is tagged with source:influencer, automatically add them to a VIP segment.
  • When a customer is tagged with source:tiktok, trigger a post-purchase SMS flow optimized for that demographic.
  • When a customer is tagged with source:meta_paid, update a custom metafield for reporting.

Manual Tagging: Why It Doesn’t Scale

You can manually tag customers in the Shopify admin. Open a customer record, type a tag, and save. This works when you have 10 customers. It does not work when you have 10,000.

The problems with manual tagging:

It is slow. Adding tags one customer at a time is not a productive use of anyone’s time.

It is inconsistent. One team member tags a customer as “Facebook,” another uses “facebook_ad,” and a third uses “Meta.” Your segments become unreliable because the same source has multiple tag variations.

It is retroactive, not real-time. By the time you manually tag a customer, the window for a timely welcome flow or post-purchase sequence has closed.

It misses data. Manual tagging requires you to first figure out where the customer came from. Without UTM tracking or attribution data already in place, you often have no way to determine the source.

Automated Tagging Approaches

Shopify Flow Rules

You can create Shopify Flow workflows that tag customers based on order data. For example, if an order’s landing_page_ref contains “gclid,” you could tag the customer as coming from Google Ads.

Limitation: Shopify Flow has limited access to marketing attribution data. It can read some order fields, but UTM parameters and detailed source information are not available as native Flow triggers without an app providing that data.

Custom Scripts with the Shopify API

You can build a custom solution that:

  1. Listens for the orders/create webhook.
  2. Reads UTM or attribution data from the order (if captured via cart attributes or metafields).
  3. Calls the Shopify Admin API to add tags to the customer record.

This works but requires development resources to build, host, and maintain. You also need the upstream UTM capture in place first.

Attribution Apps with Auto-Tagging

The simplest approach is to use an attribution app that handles both UTM capture and customer tagging as part of its workflow.

Detectly, for example, automatically tags customers with their acquisition channel when an order is placed. The tagging happens in real time as part of the order processing pipeline — no manual steps, no Shopify Flow configuration, no custom scripts.

The tags follow a consistent format (e.g., source:meta, medium:paid_social, campaign:spring_launch_2026), so your segments in Klaviyo and other tools are clean and reliable from day one.

Tag Structure Best Practices

Whether you automate tagging or do it manually, follow these conventions to keep your data useful:

Use a Namespace Prefix

Prefix acquisition tags with a namespace so they do not get mixed up with other tags you use (like “VIP” or “wholesale”):

source:meta
source:google
source:klaviyo
medium:paid_social
medium:cpc
medium:email

The colon-separated format makes it easy to filter and search for all acquisition-related tags.

Keep Tags Lowercase

Just like UTM parameters, tags should be lowercase to avoid fragmentation. Source:Meta and source:meta are different tags in Shopify.

Be Consistent with Platform Names

Decide once: is it meta or facebook? Is it google or google_ads? Document your choices and stick with them. This is especially important if multiple tools or team members are creating tags.

Don’t Over-Tag

Tagging with source and medium is almost always sufficient for segmentation. Adding campaign-level tags for every campaign creates tag clutter that makes customer records hard to read.

If you need campaign-level data, store it in customer metafields rather than tags. Tags are best for broad categorization; metafields are better for detailed, structured data.

Practical Use Cases

Use Case 1: Channel-Specific Welcome Series in Klaviyo

Create separate welcome flows in Klaviyo based on acquisition source:

  • Flow A (Meta Ads): “Thanks for checking us out! Here’s what makes [product] special…” — reinforces ad messaging, includes social proof.
  • Flow B (Google Search): “Looking for [product category]? Here’s how we compare…” — addresses search intent, includes product comparisons.
  • Flow C (Influencer): “Welcome from [influencer name]‘s recommendation…” — acknowledges the referral, includes UGC content.

In Klaviyo, set the flow trigger to “Placed Order” and add a conditional split on the Shopify customer tag.

Use Case 2: Meta Custom Audiences for Retargeting

Upload a customer list to Meta filtered by acquisition tag:

  • Create a Custom Audience of customers tagged source:meta and medium:paid_social who have not purchased in 60 days. Target them with a win-back campaign.
  • Create a Custom Audience of customers tagged source:google and medium:cpc. Build a Lookalike Audience from this group to find similar high-intent shoppers.

Use Case 3: Channel LTV Reporting

Export your customer list with tags and purchase history. Group by acquisition source and calculate:

SourceCustomersAvg. OrdersAvg. LTV90-Day Retention
Meta / paid_social1,2401.8$14722%
Google / cpc8902.1$19831%
Klaviyo / email3403.4$31258%
TikTok / paid_social2101.3$8912%

This table tells a story. Google CPC customers have higher lifetime value than Meta customers. TikTok drives volume but low retention. Email-acquired customers (likely referrals or organic signups) are the most valuable by far.

These insights should directly influence your acquisition budget and your retention strategy for each channel.

Use Case 4: Suppressing Low-Value Segments

If you identify that customers acquired through a specific campaign or channel consistently have low LTV, you can:

  • Exclude them from expensive retention campaigns
  • Reduce bids on the campaigns that acquire them
  • Adjust your offers to improve their retention (or accept the lower LTV if the CAC is also low)

Getting Started with Customer Tagging

  1. Set up UTM tracking. Customer tagging depends on knowing where each customer came from. UTM parameters are the foundation — tag every ad, email, and link you control.

  2. Implement UTM capture on your store. Use a script or app to capture UTM parameters when visitors arrive and persist them through to the order.

  3. Automate tagging. Use an attribution app like Detectly that tags customers automatically, or build a custom solution using Shopify webhooks and the Admin API.

  4. Connect tags to your email platform. Verify that Klaviyo (or your email platform) is syncing Shopify customer tags. Create a test segment to confirm tags are flowing through.

  5. Build your first channel-specific flow. Start with a simple welcome series split by acquisition source. Measure open rates, click rates, and revenue per recipient by channel to validate that channel-specific messaging outperforms generic messaging.

Wrapping Up

Customer tagging by acquisition source is one of those foundational data practices that pays dividends across your entire marketing operation. It costs nothing to implement (the tags themselves are free in Shopify), but it unlocks segmentation, personalization, and analysis capabilities that would otherwise require expensive analytics infrastructure.

The key is automation and consistency. Manual tagging breaks down at scale, and inconsistent tag names fragment your segments. Whether you use Detectly’s automated tagging, build your own solution, or use Shopify Flow, the goal is the same: every customer record should tell you where that customer came from, reliably and automatically.

That single data point — acquisition source — transforms your customer list from a flat database into a segmented, actionable marketing asset.

Ready to see your true ROAS?

Detectly tracks every UTM, attributes every Shopify order, and shows you which channels actually drive revenue.