A visitor browses three SUV pages on their phone during lunch, then signs in on a laptop that evening and reads two EV comparison articles. Without identity resolution, SitecoreAI sees two unrelated people. Without affinities, it sees two people who viewed some pages. Neither view helps personalization.
This guide walks through configuring both capabilities in SitecoreAI Audience and Insights, in the order I'd set them up on a real project, and covers the problems that usually show up after go-live rather than during setup.
Before you begin
Audience and Insights is being rolled out in phases, so availability can differ between organizations and even between environments in the same organization. Confirm the feature is visible in the environment you're working in before planning the work.
Prerequisites
You need:
- Access to a SitecoreAI environment with Audience and Insights enabled.
- A site that already sends
VIEWevents on page load. - The ability to send an
IDENTITYevent from your front end when a visitor identifies themselves (sign-in, registration, form submit). - Agreement from whoever owns privacy and data governance on which identifiers you're allowed to use.
Don't skip that last one. I've seen a rollout stall because email matching was configured before legal signed off.
Why use these features together
Identity resolution answers one question: are these interactions from the same person? Affinities answer another: what is this person interested in?
They're separate settings in the UI, but they shouldn't be separate workstreams. Identity resolution decides how much behavior lands on one profile. Affinities decide what that behavior means. Good affinities on fragmented profiles give you weak signals; clean identity without affinities gives you a known person you know nothing useful about.
How it works
Two decisions happen in this flow. The identity rule decides whether an incoming IDENTITY event matches an existing profile. The affinity calculation decides which interests a page view strengthens.
Failures almost always happen on the left branch: the rule exists, but the IDENTITY event never fires, uses the wrong provider, or fires too early. The UI configuration isn't the hard part. The event pipeline is.
Part 1: Configure identity resolution
Step 1: Choose your identifier
By default, an environment has no identity rules. You can create up to five, but most implementations need one or two. Email is the common choice.
For each candidate, check that it's stable, unique within your customer base, reliably available in the IDENTITY event, and acceptable under your privacy rules. A shared family email will merge people who shouldn't be merged. Pick an identifier because it's trustworthy, not because it's available.
Step 2: Create the identity rule
- Open Performance - Settings - Identity rules settings for your environment.
- Create a new rule.
- Select the identifier (for example, email) that incoming
IDENTITYevents will use. - Save the rule
With an email rule in place, an IDENTITY event using the email provider is compared against existing profiles holding the same email address.
Step 3: Understand the profile states
SitecoreAI tracks three profile states, and you'll see all of them during testing:
- Visitor: created automatically for a new, anonymous visitor.
- Identified: holds identifying information received through an
IDENTITYevent. - Retired: a duplicate that has been merged into another profile and is no longer active.
When QA reports "my profile disappeared," it was usually retired and merged. That's the feature working. Brief testers on this up front.
Step 4: Send the IDENTITY event
The rule does nothing on its own. Your application must send the identity information at the right moment, typically right after a successful sign-in or registration.
Two things I check on every project. First, normalize the identifier in your own code before sending it (trim whitespace, consistent casing for email) so you're not relying on assumptions about how matching handles variations. Second, make sure the event fires after the visitor's session exists. Firing it too early in the page lifecycle is a common source of "the rule never matches."
Part 2: Configure affinities
Step 5: Define your affinity taxonomy
An affinity is a name/value pair attached to a page. The name is the attribute you're tracking; the value is the specific interest.
Start from business concepts, not CMS fields. An finance site might use:
- loan_type = home, auto, business, education
- loan_purpose = debt_consolidation, home_purchase, refinance, renovation, vehicle_purchase, wedding, travel
- customer_segment = salaried, self_employed, business_owner, student, retiree
- rate_preference = fixed, variable
- Sitecore recommends only a-z, 0-9, and underscores.
Step 6: Assign affinities to pages
- Open Performance.
- Select Settings > Affinities.
- Select the site.
- Select the page you want to tag.
- Click Add affinity.
- Enter the affinity name and value.
- Save.
A page can carry up to 10 affinities. Affinities are set per page and don't carry across to other sites, so a multi-site solution needs the taxonomy applied site by site.
I tag detail pages first. A model page says far more about intent than a landing page everyone passes through, and tagging navigation pages inflates scores for whatever they carry.
Step 7: Let behavior build the scores
Once pages are tagged, SitecoreAI calculates affinity scores from VIEW events as visitors browse. Scores update in near real time during a session. When the session ends, they're saved to the profile and kept for up to 30 days.
So affinity is a moving signal. A visitor who starts on home and then reads home loan article pages shifts toward rate_preference = fixed.
Part 3: Use affinities in personalization
Step 8: Build an affinity-based condition
- Create or open a personalization variant.
- Add an affinity condition.
- Enter the affinity name, for example
loan_type. - Enter the affinity value, for example personal.
- Save and publish the variant.
The condition is satisfied when suv is the visitor's highest-scoring value within loan_type. It's a "top value" check, not a threshold. A visitor with a small interest in personal loan but a bigger interest in home loan won't match.
Type the values exactly as they appear in your taxonomy. A mismatched value doesn't throw an error. It just never matches.
Verify the configuration
Run this end to end, ideally in a clean browser profile:
- Visit the site anonymously and confirm a Visitor profile is created.
- Browse several tagged pages and confirm affinity scores appear and change.
- Sign in and confirm an
IDENTITYevent is sent with the expected provider and identifier. - Confirm the profile becomes Identified.
- Repeat on a second device or browser, sign in with the same identifier, and confirm the duplicate is Retired and the activity sits on one profile.
- Load a page with your affinity-based variant and confirm the right content shows.
Checking only the SitecoreAI UI confirms the configuration exists. It doesn't confirm the data path works. Watch the network requests in dev tools while you test.
Common mistakes
Identity rule configured, no IDENTITY events sent. The most frequent issue by a wide margin. The rule can't match what never arrives.
Treating email as a behavioral signal. Identity tells you who. It tells you nothing about intent.
Inconsistent affinity names. Variations of the same concept split scores and break conditions.
Expecting untagged or other-site pages to contribute. Only tagged pages on that site feed the score.
Troubleshooting
If profiles aren't merging, start at the browser, not the UI. Is the IDENTITY event present in the network traffic? Does it carry the provider your rule expects? Is the identifier formatted the same way across devices?
If affinity scores stay empty, check that VIEW events are firing on the tagged pages and that you tagged the right site. I've seen teams tag pages on a staging site and then test against production.
If a personalization variant never shows, compare the name and value in the condition character by character with the page configuration, then check whether another value in the same affinity name is actually the visitor's top score.
Best practices and real project tips
Assign three owners before launch: someone for identity governance (identifiers, privacy, matching strategy), someone for event quality (reliable VIEW and IDENTITY events), and someone for the affinity taxonomy. When these belong to nobody, they degrade within a few months.
Test across anonymous sessions, identified sessions, multiple devices, and repeat visits. Most identity problems only appear in the second-device test, and it's the one QA skips most often.
Keep the initial taxonomy small. A few affinity names with a handful of values each is enough to prove value.
Summary
Identity resolution and affinities solve different problems, and each is weaker without the other. My order on any SitecoreAI implementation is fixed: settle the identity strategy, prove the event pipeline, then introduce a controlled affinity taxonomy. Personalization built on that foundation holds up. Personalization built before it tends to look fine in a demo and fall apart on real traffic.
Before publishing, verify the following against the latest official Sitecore documentation:
- Identity rule limits, matching behavior, and the settings location in the UI
IDENTITYandVIEWevent schema and SDK behavior- Affinity configuration UI and per-page limits
- Affinity score calculation and retention period
- Personalization condition names and evaluation logic
- Audience and Insights rollout status and environment availability












