Skip to content

Automatic sticky bucketing for logged out users if ID is unset #145

Open
@Develliot

Description

@Develliot

How do you handle bucketing for users that are logged out and keep them sticky so they don't see a different variation on each page load?

Optimizely doesn't work unless submit a user id when setting up the provider.

I have an oauth 2.0 pkce login flow so I don't know about a logged in user until the client has access to window.
I'm currently assigning them a random ID, if I have nothing in user state or local storage and saving it to local storage but that is multiple re-renders when using a provider the wraps the entire app on the first visit. it's really nasty.

It would be nice if when no user id was provided Optimizely just handled it on client initialisation with ip/user agent hash or something. So for useDecision stuff for Optimizely full stack can do what Optimizely web can do without user IDs, I can't do this sort of stuff from the client. I could handle a single re-render on log in. This happens automatically for Optimizely web and ironically Optimizely full stack when I'm using flags it doesn't even though it costs a lot more money.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions