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.
Croct's mascot neutral
Check your local privacy laws

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:

example.js
12345
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.

gender
string

The gender of the user.

These are the possible values and what they represent:

ValueDescription
maleMale gender.
femaleFemale gender.
neutralNeither male nor female gender.
unknownAn 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.

street
string

The address' street.

The value must be between 1 and 100 characters long.

district
string

The address' district.

The value must be between 1 and 100 characters long.

city
string

The address' city.

The value must be between 1 and 100 characters long.

region
string

The address' region.

The value must be between 1 and 100 characters long.

country
string

The address' country.

The value must be between 1 and 100 characters long.

postalCode
string

The address' postal code.

The value must be between 1 and 20 characters long.

Personally identifiable information.

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.

interests
Array<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.

activities
Array<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.

stats
object

Computed metrics about the user's activity.

The platform updates these values automatically based on tracked events.

sessions
integer

The total number of sessions across all applications.

The platform automatically increments this counter every time the user starts a new session.

orders
integer

The total number of orders placed across all sessions.

The platform automatically increments this counter every time an order placed event is tracked.