There is a
moment in almost every CDP implementation where the team sits around and asks
the same question: how do we know this anonymous visitor is the same person who
logged in an hour later from their phone? It sounds simple. In practice, it is
one of the more complex problems you will face in a real Sitecore CDP project.
Identity
resolution is the process of stitching together all the signals a visitor
leaves across sessions, devices, and channels — and associating those signals
with a single, unified profile. Get this right, and your personalization
becomes sharp and meaningful. Get it wrong, and you end up with fragmented
data, duplicate profiles, and personalization logic that fires at the wrong
people at the wrong time.
Sitecore CDP
has a built-in identity resolution engine, and it is quite capable. But it is
not magic. It depends on how you feed it data, in what order, and with what
identifiers. Understanding the internals of how it works — and where it breaks
— is what separates a solid implementation from a fragile one that starts
showing cracks six months post-launch.
This post
covers everything an architect or senior developer needs to know about identity
resolution in Sitecore CDP. We will go through the mechanics, the event
sequencing, the merge strategies, cross-device challenges, privacy
implications, and what to do when things go wrong.
How Sitecore CDP Identifies a Visitor
When someone visits your site for the first time, CDP knows almost nothing about them. It knows a browser made a request. That is all. From that point, it starts building a picture using a few key mechanisms.
The browser identifier is the starting point — a first-party cookie set by CDP's JavaScript library on the first page load. This cookie carries a guest reference, which is CDP's internal handle for that anonymous session. Every event that flows in from that browser — page views, product clicks, form interactions — gets tagged with this guest reference and appended to the anonymous profile.
The customer identifier enters the picture when the visitor does something that reveals who they are: logging in, submitting a form with their email, completing a checkout. At that point, your application should fire an IDENTITY event to CDP's Cloud SDK API, including both the guest reference and the real customer identifier. That event is what triggers the merge.
CDP Identifier Types at a Glance:
Browser Identifier — Cookie set by CDP JS library on first visit
Guest Reference — Internal CDP handle for anonymous sessions
Customer Identifier — Real-world ID (email, CRM ID, loyalty number)
Email Address — Often used as the primary merge key
Phone Number — Secondary identifier in some configurations
Custom Identifiers — Any brand-specific ID passed via event payload
The Identity Resolution Algorithm
How Merging Actually Works
Identity resolution is the process of merging an anonymous profile with a known profile. In Sitecore CDP, this happens when the platform receives an event that includes both a guest reference (from the existing anonymous cookie) and a customer identifier (from a login or form submission).
The moment CDP receives that event, it looks up whether a profile already exists for that customer identifier. If one exists, the anonymous guest reference is merged into the known profile. If no existing known profile is found, CDP promotes the current anonymous profile to a known profile by attaching the customer identifier to it.
Here is what the merge process does, roughly speaking. CDP takes the behavioral history from the anonymous profile — sessions, events, page views, goals — and combines it with any data already stored in the known profile. The known profile's customer data (first name, last name, email, attributes from previous interactions) takes precedence in conflict situations, but the event history is additive. You do not lose events from either side.
Profile Reconciliation Logic
One question that comes up a lot is: what happens to the anonymous profile after the merge? In Sitecore CDP, the anonymous guest reference effectively becomes associated with the known profile. Future events from the same browser (using the same anonymous cookie) are automatically attributed to the known profile, even without sending the customer identifier again in every event.
This is an important architectural point. Once a browser has been merged with a known profile, CDP remembers that association. The cookie-to-profile mapping is persisted. So a return visit from the same browser — even without login — will route events to the known profile, not create a new anonymous one.
However, there are edge cases. If the visitor clears cookies, uses a private browsing session, or switches devices, CDP loses that browser-to-profile link. The visitor starts fresh as anonymous again — until they identify themselves once more. This is why cross-device tracking is handled separately, which we will cover shortly.
Handling Conflicts During Merge
Conflict handling is an area where many teams do not think carefully until they hit a problem in production. The most common conflict scenario is when two anonymous profiles need to merge because the same person used two different browsers before logging in.
For example: a visitor browses on Chrome at home, then the next day browses on Firefox at work, and logs in on Firefox. CDP will merge the Firefox anonymous profile with the known profile. But the Chrome anonymous profile is still floating separately, because CDP had no way of knowing they were the same person before login.
Eventually, if the person logs in on Chrome too, that anonymous profile will also get merged. CDP handles this gracefully — it adds the Chrome behavioral history to the existing known profile. But there is a window of time where some behavioral data sits in a separate anonymous profile until the second merge happens.
Event Sequencing and Data Flow
The Full Journey from Anonymous to Known
Understanding the event sequence is critical for implementation. A lot of issues in CDP projects trace back to events being fired in the wrong order, or missing events that should have triggered the identity merge. Here is the typical flow:
STEP 1 │ First Visit (Anonymous)
│ CDP JS library loads → sc_anonymous_id cookie set
│ VIEW event fires → anonymous profile created in CDP
│ Guest reference assigned
STEP 2 │ Continued Browsing
│ More VIEW events fire → behavioral data accumulates
│ All events tagged with same guest reference
STEP 3 │ Login / Form Submission
│ User logs in → your app fires IDENTITY event to CDP Cloud SDK API
│ IDENTITY event payload includes: guest reference + customer ID
STEP 4 │ Identity Resolution
│ CDP checks for existing profile with that customer ID
│ If found → merge anonymous history into known profile
│ If not found → promote anonymous profile to known
STEP 5 │ Post-Merge
│ All future events from same browser → routed to known profile
│ Personalization rules activate based on enriched profile
│ Audience segments recalculated in near real time
Merge Strategies in Real Projects
Cross-Device Tracking and Privacy Constraints
Cross-Device Challenges
Cookie Consent and GDPR Impact
When Identity Resolution Fails
- Safari's Intelligent Tracking Prevention (ITP) aggressively restricts third-party cookies and increasingly limits some first-party cookie lifetimes. Even if you are using first-party cookies, ITP may cap their expiry at 7 days in certain configurations. This means a user who visited two weeks ago will appear as a new anonymous visitor, even if they previously identified themselves. The mitigation is to set your CDP cookie as an HTTP-only, server-side cookie rather than a JavaScript-set cookie
- Ad blockers frequently block requests to CDP's Cloud API endpoint. Client-side event sending is vulnerable to this. For high-value interactions — purchase completions, form submissions — implement server-side event sending via CDP's Batch API as a fallback. Server-to-server calls bypass client-side blocking entirely.
- Missing or late IDENTITY events are probably the most common implementation bug. This usually happens in SPAs where the login interaction does not trigger the correct event, or where the IDENTITY event fires but with an incomplete payload. Thorough end-to-end testing of the login flow — checking CDP's event stream directly — is the only reliable way to catch this.
- When identity resolution cannot complete, experiences should degrade gracefully. Every Sitecore Personalize experience should have a sensible default variant that applies when the visitor is unknown or the profile is incomplete. Experiences designed only for fully-known visitors will misfire on a meaningful percentage of real-world sessions.
- Troubleshooting Approach When identity resolution is not working as expected, the debugging process typically follows this order: First, verify in CDP's event stream that events are being received with the correct guest reference and customer identifier. Second, check the order of events — is the IDENTITY event firing before other post-login events? Third, look at the profile in CDP's Guest Profile Viewer and check whether the known customer identifier is attached. Fourth, inspect the browser's cookie storage to confirm the anonymous cookie is being set and persisted correctly.
Architecture Best Practices
Data Governance Starts at the Identifier Level:
Event Naming Standards
Identifier Strategy
Profile Enrichment Considerations
API Considerations
Debugging Approaches
What Teams Should Avoid
Conclusion
References
- Identifying guests in Sitecore CDP
- Understanding sessions and events in Sitecore CDP
- Understanding identity resolution in Sitecore CDP — the official overview covering how CDP uses identity rules to identify guests across channels and devices
- Examples of identity rules using unique identifiers — covers how CDP evaluates the identifiers array and migrates guest data to a known customer profile
- Examples of identity rules using personal data — covers PII-based identity resolution for CDP 2.0 data model tenants
- IDENTITY event reference — full payload specification including the identifiers object, browser_id, and channel attributes
- Sending events via the Stream API — covers real-time behavioural event capture including VIEW events and custom events
- View your organisation's identity rules — explains how CDP evaluates multiple identity rules in priority order to find matching guest profiles
- Configure identity rules — step-by-step guide to setting up CRM ID, loyalty ID, and other identifier-based rules in the CDP tenant
- Batch API — use for uploading large volumes of guest data, including bulk profile merges and offline identity resolution
- Cookies in Sitecore CDP — covers the bid_{clientKey} first-party cookie, its role in browser ID persistence, and consent-conditional initialization
- Data privacy compliance with Sitecore CDP — GDPR and CCPA guidance including server-set httpOnly cookies, consent gating, and data encryption
- Cloud SDK cookies — explains how server-set cookies mitigate Safari ITP's 7-day expiry restriction on client-set cookies
- Integrate using the Engage SDK script — includes the Content Security Policy requirements and consent-conditional loading pattern
- Sitecore CDP for developers — top-level API reference covering Stream API, Batch API, REST API, and data lake export
- Sending guest data — explains when to use Batch API vs REST API for profile creation, updates, and data extensions


















