Attributes (Feature Flags)
Feature Flag projects manage user attributes from the Audiences > Attributes tab. Attributes are the user properties available for audience targeting, and come in two categories: auto-detected attributes that the SDK captures automatically, and custom attributes that your application passes during flag evaluation.
Auto-detected attributes
When you create a Feature Flag project, 11 built-in attributes are registered automatically. These are properties the SDK detects from the user's environment without any code from your side.
All SDK attributes
These attributes are available in both client-side and server-side SDKs:
- browser — Browser name (Chrome, Firefox, Safari, etc.)
- browserVersion — Browser version string
- os — Operating system (Windows, macOS, Linux, iOS, Android)
- osVersion — OS version string
- deviceType — Device category: desktop, mobile, or tablet
- country — Two-letter country code from IP geolocation
For server-side SDKs, pass userAgent and ip in the evaluation context to enable detection:
1client.evaluateFlag('flag-key', {2 userAgent: req.headers['user-agent'],3 ip: req.ip,4})Client-only attributes
These attributes are detected from browser APIs and are only available in client-side SDKs (@avsbhq/react):
- language — Browser language code (en-US, fr, de)
- timezone — IANA timezone (America/New_York)
- screenWidth — Screen width in pixels
- screenHeight — Screen height in pixels
- darkMode — Whether the user prefers dark color scheme
Custom attributes
Custom attributes represent properties from your application — user identity, subscription plan, feature entitlements, team membership, or any other data you want to target by.
Registering a custom attribute
- Go to Audiences > Attributes
- Click "Add Attribute"
- Fill in the key (alphanumeric with underscores, e.g.
userId), display name, type (String, Number, Boolean, or JSON), and optional description - For String attributes, you can add suggested values (e.g.
free,pro,enterprise) that appear as dropdown options in the audience builder
Creating attributes inline from the audience builder
You can also create a new attribute without leaving the audience you are building. When you add a Custom Attribute condition, the attribute picker has a + New attribute affordance at the bottom of the dropdown. Click it to open a small form, register the attribute, and have it auto-selected for the condition you were editing — no round-trip to the Attributes tab.
Passing custom attributes in your code
1client.evaluateFlag('checkout-redesign', {2 userId: user.id,3 plan: user.subscription.plan,4 companySize: user.company.employeeCount,5})Attribute types and operators
Each attribute type supports different comparison operators in audience conditions:
- String — equals, does not equal, contains, starts with, ends with, regex, in list, not in list, exists, does not exist
- Number — equals, does not equal, greater than, less than, greater than or equal, less than or equal, exists, does not exist
- Boolean — equals, does not equal, exists, does not exist
- JSON — contains, does not contain, exists, does not exist
Deleting attributes
Custom attributes can be deleted from Audiences > Attributes. Built-in auto-detected attributes cannot be deleted.
If a custom attribute is used in any audience condition, deletion is blocked. Remove the attribute from all audience conditions first, then delete it.