Advice and answers from the UserGuiding Team
Users
Engagement
Settings
Using List Attributes
Learn how to send list attributes and use them to filter and segment your users and companies.

What Is a List Attribute?

A list attribute holds multiple text values for a single user or company, such as roles, enabled features, or teams. You can use it to target users who have one specific value, any of several values, or all of a set of values.


Sending List Attributes

Send an array through window.userGuiding.identify() or the User API:

window.userGuiding.identify(userId, {
roles: ["admin", "editor"],
company: {
id: '1',
features: ["reports", "exports"]
}
});


UserGuiding normalizes list values as follows:

  • Text items are kept as they are.
  • Booleans become "true" or "false", and numbers become text.
  • Nested values and items longer than 1024 characters are dropped.
  • Only the first 100 items are kep
  • An empty array counts as no value.


Filtering With List Attributes

On the Users page and in segments, list attributes offer these conditions:

  • includes: the list contains the given value.
  • does not include: the list does not contain the given value.
  • includes one or more of: the list contains at least one of the given values.
  • includes all of: the list contains every one of the given values.
  • has any value: the attribute has at least one item.
  • is not known: the attribute is missing or empty.


For "includes one or more of" and "includes all of", enter several values separated by commas. Matching compares whole items and ignores case, so "Admin" matches "admin" but "adm" does not. If an attribute was previously sent as a single text value, it is treated as a one-item list.



Converting an Attribute to List

Go to Settings > Data, open the settings of a Text attribute, select List as the data format, and click Save. Only Text attributes can be converted, and a List attribute cannot be converted to another format later.



How List Values Appear

The Users page and the user and company details pages show list values in brackets, for example [admin, editor]. CSV exports and personalization macros such as {{roles}} join the items with a comma, for example "admin, editor".

Did this answer your question?
Ask AI
Responses are generated using AI and may contain mistakes.
How can I help you?
Ask me anything about our product. I can help you find answers across the knowledge base.
Ask a question...Ctrl+I