Experience Continuity enables you to customize and track the experience of a visitor from anonymous (before they log in) to logged in state.
With Experience Continuity, you can change your visitor ID from an anonymous ID (session ID for instance) to authenticated ID (database ID for instance), without changing their experience and duplicating their tracking. This enables cross-device authenticated experience without compromising on cross-session experience continuity.
In order for the Experience Continuity to work, once your visitor logs in, you need to tell Flagship who this anonymous visitor now becomes. That is the purpose of the
visitor_id body fields in the Decision API, and the
authenticate method of the SDK.
authenticated on a visitor instance of the SDK, behind the scene you are saying that the current visitor ID was actually an
anonymous_id, and that the new
visitor_id is the authenticated visitor ID. On the next call to
synchronizeModifications, the SDK will call the Decision API with those 2 IDs in the body.
When receiving the 2 IDs (anonymous & authenticated), the Decision API follows the following flows:
- It checks whether your authenticated visitor has already been assigned the experiment (maybe on another device or session). If so, the variation assigned is returned, and the experience is kept between the cross-device authenticated visitor.
- If it is the first time the visitor is authenticated, the Decision API links the authenticated experience with the previously assigned anonymous ID variation and returns the already assigned variation. This way, the cross-session anonymous/logged-in experience is kept.
You can see in detail in the Decision API Docs how to use the
anonymous_id in the Decision API calls.
The Experience Continuity feature, because it requires persistent storage of the link between the anonymous and authenticated ID, is only available for the cloud Decision API.
The use of this feature requires having the option enabled in your Flagship account beforehand. Select the desired environment and go to /settings/environment-settings and enable the "Experience Continuity" option.
Updated 3 months ago