Hey there :wave: we have multiple frontends for o...
# ask-questions
e
Hey there 👋 we have multiple frontends for our products. Some are private and the user needs to be logged-in. Others are a mix of both: the user can be anonymous or logged in. What is the best strategy for the assignment attributes here? I've seen this FAQ here: https://docs.growthbook.io/faq#what-do-i-use-for-an-id-attribute-in-the-sdk-if-my-users-arent-logged-in We want a consistent feature flag assignment (e.g. tight to a rollout rule) across multiple frontends. Does it make sense to add another identifier attribute (e.g.
deviceId
) ? and use both, the default
id
and the additional
deviceId
, to define the rollout rule? Do those 2 identifiers serve as a combined key for a user? But how can we be sure we target the same user in case they are logged-in or not. Their
deviceId
would be the same, but the
id
would be empty in case the same user is not logged and filled when they are. Would the targeting still work for them? Thank you!
s
It sounds like you're on the right track. Can you say more about what kind of rollout you're doing (so I can have all the details)? Sticky bucketing may also be useful to you.
e
We basically want a cross-frontend "Percentage Rollout" https://docs.growthbook.io/features/rules#percentage-rollout We want a defined subset of users (which have certain pre-conditions met, e.g. at least one sale in the last 3 months). This additional attribution could be set as another attribute (together with
id
and
deviceId
). Then we want to rollout the new feature to 10% of that eligible user set.
It should be noted that the
deviceId
would be stable across those frontends as they all run under the main domain. Only the
id
can differ: empty ("") for anonymous users, the user's account id for logged-in ones.
s
Gotcha. Sounds like you're on the right track, where you'd set the percentage rollout based on the more stable user ID and then set up targeting on the rollout rule (like "one sale in last 3 months").
e
Great! I did a small test this morning and it worked as expected 🙂