I have a website where one user can have many roles (e.g., "merchant", "customer", "admin"). These roles can be combined in any combination (e.g., users can be a "merchant" and a "customer"). Ideally, I'd like to filter analytics data by these roles.
Can I create a user property that's just an array of these roles?
firebase.analytics().setUserProperties({ roles: ['merchant', 'customer'] })
I realize that I could split this out into multiple properties…
firebase.analytics().setUserProperties({ isMerchant: true })
firebase.analytics().setUserProperties({ isCustomer: true })
firebase.analytics().setUserProperties({ isAdmin: false })
… but that would get messy as the number of roles grow. I'd prefer to use an array if possible.
The value of property will be interpreted as a string
not as an object or array.