Skip to main content

How Can You Create a Stable Identifier for Returning Shopify Guest Customers?

A guest shopper may have a browser ID, cart token, checkout token, email, and eventual Shopify customer ID at different moments. The reliable solution is not one magical guest ID—it is a controlled identity map that knows when those signals can be joined.

Identity ResolutionAlex Liju·Founder of Attribuly11 min readPublished Last updated Sep 11, 2026

TL;DR

  • A pre-purchase Shopify guest does not begin with a universal, permanent person-level customer ID.
  • Session IDs, cookies, cart tokens, and checkout IDs describe a browser or transaction context; they do not automatically prove the same person across devices.
  • Email, login, checkout contact, order customer ID, or another deterministic signal can anchor a guest journey to a profile.
  • Use an identity graph with provenance, consent, timestamps, confidence, and merge rules instead of overwriting identifiers.
  • Capture can identify some eligible new high-intent U.S. visitors; ReCapture can reconnect returning shoppers already represented in Klaviyo when the browser link is lost.
Get a tailored walkthrough
See how Attribuly fits your Shopify + Klaviyo setup.
Book a demo
How Can You Create a Stable Identifier for Returning Shopify Guest Customers?

Why is there no single Shopify guest customer ID before purchase?

Before a guest identifies, Shopify and connected tools can observe a session and commerce actions without necessarily knowing the person. The identifiers available at that stage serve different purposes:

IdentifierRepresentsUseful forMain limitation
Session or browser IDOne browser contextSequencing page and product eventsCan expire, reset, or differ across devices
First-party cookie/local storageBrowser continuityReturning-session recognitionSubject to consent, deletion, and browser restrictions
Cart tokenA cart instanceRestoring items and cart contextA person can create multiple carts; tokens are not universal identities
Checkout ID/tokenA checkout instanceLinking checkout-stage eventsExists late in the journey and is transaction-specific
Email or login IDA deterministic profile signalConnecting behavior to a known person/profileMust be collected and used with appropriate consent and controls
Shopify customer IDA Shopify customer recordOrders and customer lifecycleMay not be available until the record exists and does not identify earlier browsers automatically
ESP profile/external IDA marketing-system recordSegmentation and automationNeeds an event-to-profile connection to activate behavior

A “stable guest identifier” is therefore a relationship among identifiers, not one field that appears at the first pageview.

> Understand the identity model before implementing it. Read the ecommerce identity-resolution guide for identifier precedence, merge logic, and activation patterns.

What should a Shopify guest identity record contain?

Keep an append-only identity map that preserves where each signal came from.

internal_person_or_profile_key
├── browser/session IDs
├── cart and checkout tokens
├── Shopify customer ID, when available
├── ESP profile ID or external ID
├── hashed or protected email reference
└── consent, source, timestamps, and merge evidence

At minimum, record:

  • identifier type and value or protected representation;
  • first-seen and last-seen timestamps;
  • source system and event;
  • store and environment;
  • consent and permitted purposes;
  • confidence or merge basis;
  • merge and unmerge audit history;
  • retention and deletion status.

Do not silently replace the session ID with an email. Retain both and record why the relationship was established.

When is it safe to join two guest sessions?

Prefer deterministic evidence.

Stronger signals

  • the same authenticated customer account;
  • the same verified checkout email under an appropriate purpose;
  • the same Shopify customer or ESP profile ID;
  • a tracked email click that identifies the destination browser;
  • an explicit identify call after the user supplies a verified identifier;
  • an eligible identity-network match with documented provenance.

Weaker signals

  • IP address;
  • user agent;
  • approximate location;
  • similar product activity;
  • shared household or corporate network.

Weak signals may help with fraud, analytics, or probabilistic models, but they should not be treated alone as proof that two browsers belong to the same person.

How should the identity lifecycle work?

1. Create an anonymous session key

Assign a scoped first-party identifier only after the applicable consent decision. Use it to connect events within the permitted browser context.

2. Preserve commerce identifiers

Attach cart and checkout tokens to the anonymous session. Deduplicate events with stable event IDs and timestamps.

3. Add identity when it appears

When the shopper logs in, supplies checkout contact information, clicks a tracked message, or otherwise provides a valid signal, associate the anonymous context with the known profile under explicit merge rules.

4. Send identity and behavior to destinations

Map the resulting profile to Shopify, Klaviyo, analytics, and advertising destinations only for permitted purposes. Keep each destination's consent and suppression state.

5. Reconnect future visits conservatively

Use a durable first-party or permitted identity layer to restore the known relationship. Never infer person-level identity from IP address alone.

6. Support correction and deletion

Identity mistakes compound across systems. Maintain unmerge, access, deletion, and suppression procedures.

Where do Capture and ReCapture fit?

They address opposite sides of the guest identity problem.

Guest situationMissing linkProduct fit
High-intent U.S. visitor never supplies an email to the storeNo reachable profile is createdAttribuly Capture may identify an eligible visitor through a consent-based identity network and sync the profile plus intent behavior
Returning visitor already exists as a Klaviyo profile but arrives without a live browser connectionCurrent events cannot be associated with the known subscriberAttribuly ReCapture reconnects eligible onsite behavior to the existing profile so the original flows can evaluate it
Shopper remains anonymous and ineligible for matchingNo lawful or reliable person-level signal existsKeep aggregate/session analytics; do not force a person identity

Capture includes the first 500 identified emails free, with no credit card required. ReCapture includes a minimum 4× return guarantee on its spend, measured in recovered-cart revenue attributable to shoppers it identified.

To benchmark the commercial effect of stronger identity continuity, read Attribuly's email identification and revenue whitepaper. The analysis covers 400 brands, eight industries, four high-value events, and different store sizes, connecting ESP recognition coverage with revenue outcomes.

> Estimate the value of better identity continuity. Use Attribuly's shopper identification audit to compare high-value-event coverage with 400 brands across eight industries.

What should you measure?

Track the identity system as a funnel:

  1. anonymous sessions with permitted event capture;
  2. sessions containing high-value behavior;
  3. sessions linked to profiles;
  4. links created by each identification method;
  5. profiles eligible for each activation channel;
  6. recovered orders and incremental gross profit;
  7. false merges, unmerges, deletions, complaints, and suppressions.

A match rate without activation eligibility or accuracy controls is not a business outcome.

Common mistakes

Using the cart token as the person ID

A cart is an object, not a customer. Keep cart and person identifiers separate.

Treating IP address as deterministic identity

Networks are shared and addresses change. IP alone is not a safe person-level key.

Merging without provenance

If you cannot explain why two IDs were joined, you cannot audit or correct the profile later.

Ignoring consent and suppression during sync

Profile identity does not automatically create permission to market. Preserve channel-specific states across every destination.

Next step

Design identity as a lifecycle: anonymous session, commerce context, deterministic anchor, destination profile, future reconnection, and deletion. That model is more reliable than searching for one permanent guest ID that does not exist at every stage.

> Test both identity gaps. Start the seven-day Attribuly trial. Capture includes the first 500 identified emails free, and ReCapture carries the conditional 4× ROI guarantee described above.

Try it on your store
Connect your store and start recovering more revenue with better reach.
Start free trial

FAQs

Does Shopify assign a customer ID to every anonymous visitor?
No. Shopify can publish anonymous customer events and transaction identifiers, but an unauthenticated visitor is not automatically a permanent person-level customer record.
Does a guest checkout eventually create a Shopify customer record?
A completed guest order can be associated with a Shopify customer record, and checkout-completed payloads may expose the resulting customer in the appropriate event object. Test the exact API and event context you use.
Can a cart token identify a returning customer?
It can restore or associate a cart context, but it should not serve as universal proof of person identity across carts, browsers, and devices.
Can local storage provide a permanent guest ID?
No. It is browser-specific and can be cleared, blocked, or expired. Treat it as one continuity signal.
How do I connect guest behavior to Klaviyo?
Capture events with stable IDs, then send or associate them with the Klaviyo profile after a supported deterministic identity signal. Verify the profile timeline and flow entry separately.
What is the difference between Capture and ReCapture for guest shoppers?
Capture covers eligible high-intent visitors who never created a store profile. ReCapture covers returning visitors who already have a Klaviyo profile but whose current session is disconnected.
Can both products run together?
Yes. Attribuly's seven-day trial supports Capture and ReCapture together, allowing one store to measure both missing populations.

About Attribuly

Attribuly helps DTC brands recover abandoned cart revenue. We identify anonymous visitors and existing subscribers your ESP (like Klaviyo) missed, enrich their profiles, and feed the signals back — so your abandonment flows fire and your retargeting audiences grow, and you recover at least 15% more revenue. Shopify featured app, Klaviyo tech partner. Trusted by 20,000+ brands. Guaranteed 4× ROI.