Attributes & segments
Attach traits to visitors and filter live sessions and replays by who they are.
Attributes let you describe who a visitor is — their plan, region, signup source, or any custom trait that matters to your product. Once a visitor carries attributes, you can filter live sessions and session replays by those traits, and target proactive nudges at exactly the people you want to reach. This turns a long list of anonymous sessions into something you can slice by audience.
Where attributes come from
There are two ways to attach attributes to a visitor, and you can use either or both:
- Traits passed to
identify()— when you tell NudgeVisor who a visitor is, you can pass their details in the same call. See Identifying visitors. - The
setAttributes()call — for adding or updating traits later, without re-identifying the visitor. See setAttributes().
For example, you might set name and email at login through identify(),
then update plan later in the session when the visitor upgrades:
NudgeVisor.identify('USER_ID', {
name: 'Ada Lovelace',
email: '[email protected]',
plan: 'Enterprise',
region: 'EU',
});
NudgeVisor.setAttributes({
plan: 'Enterprise',
seats: 25,
});
Reserved vs custom attributes
name and email are reserved keys — they power the visitor's display name and are
shown and searched everywhere in NudgeVisor. Every other key you send is stored as a custom
attribute on the visitor's profile.
Both strings and numbers are supported, so you can store text traits like plan: 'Enterprise' or
numeric ones like seats: 25. Custom attributes are listed on the visitor's profile and travel with
them across sessions.
Filtering live sessions and replays
Once visitors carry attributes, you can filter by them in two places:
- The live visitor view — narrow the list to only the people who match, such as visitors currently on your site who are on the Enterprise plan.
- Session replays — find recordings by who the visitor was, for example replays from visitors in a particular region.
This makes attributes the building blocks of a segment: a saved view of visitors who share a trait.
Built-in attributes captured automatically
You don't have to set everything yourself. NudgeVisor captures the visitor's location and country automatically from their IP address, so geographic filtering works out of the box without any code. This means you can segment by region even for anonymous visitors you have never identified.
Using attributes to target nudges
Attributes don't just filter what you see — they decide who you reach. When you set up a proactive nudge, you can target it at visitors who match specific attributes, so the right message reaches the right audience. For example, you might show an onboarding nudge only to visitors on the Free plan, or a renewal prompt only to Enterprise customers.
Next steps
- Identifying visitors — attach traits when you know who someone is.
- setAttributes() — update attributes mid-session without re-identifying.
- Nudges — target messages at the segments you've defined.