Anonymous and identified events
When an event creates or updates a person profile, what anonymous events can and cannot do, and how to choose the right setting for your site.
Every event belongs to someone, but not every event needs a full person profile. An identified event updates a person profile, with its properties and history. An anonymous event is recorded without one: it still counts in your charts, but it carries no person properties.
How the snippet decides
The snippet starts the library with person_profiles: 'identified_only'. With this setting, a visitor's events are anonymous until any of these happens:
- you call
myjourney.identify(...); - you set person properties with
setPersonPropertiesorunsetPersonProperties; - you call
myjourney.alias(...); - you call
myjourney.createPersonProfile().
From then on, every event from that browser is identified, including on later visits, until myjourney.reset() starts a new anonymous visitor.
Anonymous events are stored with the property $process_person_profile set to false, so you can filter for them.
What anonymous events can do
- Count in trends, funnels, retention, paths and web analytics, including unique visitor counts.
- Carry event properties, such as the page, browser and campaign, for filters and breakdowns.
- Join the visitor's sessions and recordings.
- Become part of the person's history once the visitor is identified: their earlier anonymous events are linked to the person.
What needs identified events
- Person properties in filters, breakdowns and cohorts.
- A profile you can open under Activity → Persons.
- Joining one person's activity across devices.
Choose a setting
person_profiles | Use it when |
|---|---|
'identified_only' (the snippet's default) | Most visitors never sign in, and you want person profiles for the ones who do. |
'always' | You want a person profile, with person properties, for every visitor, including anonymous ones. |
'never' | You never need person profiles. Calls such as identify are ignored. |
To change it, edit the option in the snippet's myjourney.init call.
Create a profile for an anonymous visitor
To give a visitor a profile without knowing who they are, for example when they start a checkout:
myjourney.createPersonProfile();Server-side events
Events you send from your server decide this themselves. To send an anonymous event, set $process_person_profile to false in its properties. Any person properties sent with such an event ($set, $set_once) are removed. Events that only make sense for a person, such as $identify, $create_alias and $groupidentify, are discarded if they arrive with $process_person_profile: false, and appear in Event ingestion warnings.
Related
Can't find what you need? Contact support