This page covers technical implementation — the identity fields on events, how session stitching works, and the impact on destination match quality. For a conceptual overview of identity resolution and how the identity graph works, see Identity Resolution.
Identity Fields on Events
After identity resolution, events carry these identity-related fields:How Identity Attaches to Events
Identity resolution happens at the Resolve stage of the pipeline, between event capture and destination forwarding.1. First-Party Cookie Matching
When a visitor lands on your store, the Upstack Pixel sets a first-party cookie. Every event in that browsing session shares the samesession_id. If the visitor has been seen before (returning visitor), the cookie links to their existing identity profile.
2. Deterministic Identification
When a visitor provides a hard identifier — logging in, entering an email at checkout, clicking a Klaviyo email link — Upstack ID creates a deterministic match:- The
session_idis linked to the customer’sidentity_id em(hashed email) andph(hashed phone) are attached to the eventexternal_idis set from the Shopify customer ID
3. Session Stitching
This is where the real value emerges. When identification happens mid-session (e.g., at checkout), Upstack ID retroactively enriches all prior anonymous events in that session with the resolved identity data. A typical session flow:
Without stitching, the PageView, ViewContent, and AddToCart events would be forwarded to destinations with weak identity signals. With stitching, every event in the session carries the full set of match keys.
Session stitching is retroactive within the session. Events are held briefly in the pipeline to allow late-arriving identity data to propagate. The hold window is short enough to maintain near-real-time forwarding.
4. Cross-Device Linking
When the same email or phone appears across sessions on different devices, Upstack ID merges those sessions under a singleidentity_id. A shopper who browses on mobile and purchases on desktop is recognized as one customer.
Cross-device linking enables:
- Accurate attribution across devices
- Larger retargeting audiences (one profile instead of two)
- Complete customer journey visibility in analytics
Impact on Destination Match Quality
Identity resolution directly drives the match keys available for each destination:
The difference is especially pronounced for upper-funnel events (PageView, ViewContent) that typically fire before the visitor has identified themselves. Session stitching ensures these events reach destinations with full identity data.
How This Connects to the Broader Pipeline
Identity resolution sits between event capture and destination forwarding:- Capture — Upstack Pixel fires raw events with whatever signals are available.
- Resolve — Upstack ID attaches identity, stitches sessions, and links devices. (You are here.)
- Enrich — Product catalog data and UTM parameters are merged.
- Activate — Identity-enriched events are forwarded to destinations with maximum match keys.
Related Documentation
Identity Resolution
Conceptual overview: identity graph, deterministic matching, cross-device linking.
JavaScript SDK
How to call identify() to associate user identity with sessions.
Properties & Context
Full reference for all identity fields, custom data, and context on events.
Standard Events
Events that carry identity data after resolution.