In Split, a segment is a list of user ids. A segment is a list (or group) of users which can be linked up with a feature flag in Split. While users can be added to feature flags individually, segments provide a convenient way to add groups of users with common roles or characteristics.
Creating a Segment in Split
You can log in or create a free Split account and create your segments in the Split Admin Console. You then add users to your segment by creating meaningful strings that will be the user ids.
How Segments Work With Feature Flags in Split
Once created, you can add a segment to a feature flag definition in the Split Admin Console instead of adding individual user ids. (The segment ‘Traffic type’ and ‘Environment’ settings must match these same settings of the feature flag.) You can add a segment to a feature flag’s individual targets. You can also create a feature flag targeting rule and set the percentage for the feature flag result for that segment. For instance, you can set a feature flag called ‘high_contrast_color_scheme’ to be ‘on’ for 50% of the users in a segment named ‘american_customers’.
When you evaluate your feature flag in code, you provide a key along with the feature flag name. If the key exactly matches one of the user ids in your segment (the key cannot be the segment name), then Split will execute the feature flag targeting rule that targets that segment.
Get Split Certified
Split Arcade includes product explainer videos, clickable product tutorials, manipulatable code examples, and interactive challenges.
Deliver Features That Matter, Faster. And Exhale.
Split is a feature management platform that attributes insightful data to everything you release. Whether your team is looking to test in production, perform gradual rollouts, or experiment with new features–Split ensures your efforts are safe, visible, and highly impactful. What a Release. Get going with a free account, schedule a demo to learn more, or contact us for more information.