User
Explore what information is available for users.
This type represents an individual, such as a customer, user, or anonymous visitor. It includes the profile, statistics, and other personal information.
The user profile has predefined properties that are common to all users.
In addition to the properties listed below, the user profile supports additional properties called custom attributes.
Properties
These are the predefined properties of the user profile:
- id(optional)
The user's unique identifier provided by the application, such as a UUID or a username.
- name(optional)
The name of the user as a combination of their first and last name, separated by a space. For instance, "John Doe".
This property is virtual, meaning it is not stored in the user profile. Instead, it is derived from the first and last name.
- firstName(optional)
The first name of the user. For example, "John".
- lastName(optional)
The last name of the user. For example, "Doe".
- age(optional)
The age of the user. For example, 30.
This property is virtual, meaning it is not stored in the user profile. Instead, it is derived from the birth date.
- birthDate(optional)
The birth date of the user. For example, 1990-01-01.
- gender(optional)
The gender of the user.
- email(optional)
The email address of the user. For example, "john@example.com".
- alternateEmail(optional)
The alternate email address of the user, such as a work email address or a secondary email address.
- phone(optional)
The phone number of the user. For example, "+1 555 555 5555".
- alternatePhone(optional)
The alternate phone number of the user, such as a work phone number or a secondary phone number.
- address
The address of the user.
- avatar(optional)
The URL of the user's avatar image.
- company(optional)
The company the user works for.
- companyUrl(optional)
The URL of the company the user works for.
- jobTitle(optional)
The job title of the user.
- interests
The set of interests the user demonstrates, with no duplicates. For example, "ab testing", "analytics", "data science", etc.
- activities
The set of activities the user performs, with no duplicates. For example, "ab testing", "analytics", "data science", etc.
- stats
The aggregate statistics about the user.
- <attribute>(optional)
A custom attribute, where /*<attribute>*/ is the name of the attribute.
You can access any custom attribute just like any other property. For example, if you have defined a custom property named plan, you can access it like this:
user's planIf a custom attribute has the same name as a predefined one, it takes precedence and hides the predefined attribute without overwriting it. Removing the custom attribute exposes the predefined one again.
Gender
Additional values may be added in the future to include other genders. Therefore, this enumeration is not guaranteed to support backward compatibility.
These are the possible values and what they represent:
Value | Description |
---|---|
male | Male gender. |
female | Female gender. |
neutral | Neither male nor female gender. |
unknown | An unspecified gender. |