Creating and using user segments
Segments group users based on custom attributes like plan type, company, or usage level. Use segments to target specific users with announcements, surveys, or filtered views.
User segments require the Growth plan or higher.
Setting up custom attributes
Before creating segments, pass custom attributes through your Frill widget script:
Frill.widget('widget_id', {
user: {
email: '[email protected]',
name: 'Jane Doe'
},
attributes: {
plan: 'business',
mrr: 150,
company: 'Acme Corp'
}
});You can pass any key-value pairs. Frill will track these attributes for each user.
Creating a segment
To create a user segment:
Go to Dashboard > Tracked Users > Segments
Click Create Segment
Name your segment (e.g., "Enterprise Customers")
Add conditions using your custom attributes
Click Save
Segment conditions
Build segment rules using conditions:
Equals: Attribute matches exact value (e.g., plan = "enterprise")
Greater than / Less than: Numeric comparisons (e.g., mrr > 500)
Contains: Partial text matches (e.g., company contains "Tech")
Combine multiple conditions with AND/OR logic to create complex segments.
Using segments
Once created, use segments to:
Target announcements: Show changelogs only to specific user groups
Filter surveys: Send NPS surveys to high-value customers
Analyze feedback: Filter ideas by segment in your dashboard
Customize widgets: Show different content based on user attributes
Start with simple segments (e.g., "Paying Customers" vs. "Trial Users") and add complexity as your needs grow.
Company-level attributes
For B2B apps, use company-level attributes to group users by organization:
Frill.widget('widget_id', {
user: {
email: '[email protected]'
},
companies: [{
id: 'acme-corp',
name: 'Acme Corp',
plan: 'enterprise',
seats: 50
}]
});Create segments based on company attributes the same way you would with user attributes.