Standard attributes
Explore the predefined attributes available on every user profile.
Standard attributes are predefined properties available on every user profile. They cover personal details, contact information, behavioral signals, and computed metrics.
Personally identifiable information
Some attributes may hold personally identifiable information, such as name, email, and phone. Because we put privacy first, the platform restricts how this kind of data can be accessed when the user has not been identified.
Still, you can still set these attributes for an anonymous user. The captured values are kept until either of the following happens:
- The user identifies themselves, and the values are migrated to their identified profile and become available for audiences and personalization.
- The session ends without the user identifying themselves, and the captured values are discarded.
The platform acts as a data processor, handling this information on your behalf. Collecting user consent and complying with the privacy laws that apply to your business and your users' jurisdictions is your responsibility as the data controller.
Implementation
Here is an example of how to set a standard attribute:
import croct from '@croct/plug';
await croct.user.edit() .set('firstName', "John") .save();Attributes
- firstName(optional)string|null
The user's first name. For example, "John".
The value must be between 1 and 50 characters long.
Personally identifiable information.
- lastName(optional)string|null
The user's last name. For example, "Doe".
The value must be between 1 and 50 characters long.
Personally identifiable information.
- birthDate(optional)string|null
The user's birth date. For example, "1990-01-01".
The value must be a valid ISO 8601 date in the form YYYY-MM-DD.
Personally identifiable information.
- genderstring
The gender of the user.
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. Personally identifiable information.
- email(optional)string|null
The user's email address.
The value must be between 1 and 254 characters long.
Personally identifiable information.
- alternateEmail(optional)string|null
The user's alternate email address, such as a work email address or secondary email address.
The value must be between 1 and 254 characters long.
Personally identifiable information.
- phone(optional)string|null
The user's phone number.
The value must be between 1 and 30 characters long.
Personally identifiable information.
- alternatePhone(optional)string|null
The user's alternate phone number, such as a work phone number or a secondary phone number.
The value must be between 1 and 30 characters long.
Personally identifiable information.
- address(optional)object|null
The user's address.
- streetstring
The address' street.
The value must be between 1 and 100 characters long.
- districtstring
The address' district.
The value must be between 1 and 100 characters long.
- citystring
The address' city.
The value must be between 1 and 100 characters long.
- regionstring
The address' region.
The value must be between 1 and 100 characters long.
- countrystring
The address' country.
The value must be between 1 and 100 characters long.
- postalCodestring
The address' postal code.
The value must be between 1 and 20 characters long.
Personally identifiable information.
- street
- avatar(optional)string|null
The URL of the user's avatar image.
Personally identifiable information.
- company(optional)string|null
The company the user works for.
The value must be between 1 and 200 characters long.
Personally identifiable information.
- companyUrl(optional)string|null
The URL of the company the user works for.
Personally identifiable information.
- jobTitle(optional)string|null
The job title of the user.
The value must be between 1 and 50 characters long.
Personally identifiable information.
- interestsArray<string>
The user's demonstrated interests, such as "ab testing", "analytics", "data science", etc.
The value must be a list of up to 30 strings, each between 1 and 30 characters long.
- activitiesArray<string>
The user's performed activities, like "sign up", "purchase", "upgrade", etc.
The value must be a list of up to 30 strings, each between 1 and 30 characters long.
- statsobject
Computed metrics about the user's activity.
The platform updates these values automatically based on tracked events.
- sessionsinteger
The total number of sessions across all applications.
The platform automatically increments this counter every time the user starts a new session.
- ordersinteger
The total number of orders placed across all sessions.
The platform automatically increments this counter every time an order placed event is tracked.
- sessions