User signed up

Record when a user signs up.

This event tracks when a user creates an account.

Croct's mascot neutral
When should you track this event?

Track this event whenever a user signs up. If your application logs users in immediately after signup, also track the sign-in event.

If the user profile does not exist, a new profile is created using provided information. This does not affect existing profiles.

Implementation

Here is an example of how to track this event:

example.js
12345678910
import croct from '@croct/plug';
croct.track('userSignedUp', {
userId: '1ed2fd65-a027-4f3a-a35f-c6dd97537392',
profile: {
firstName: 'Carol',
lastName: 'Doe',
email: 'carol@example.com'
}
});

Input properties

These are the supported properties:

userId
string

The user's unique identifier provided by the application, such as a UUID or a username.

The value must be between 1 and 100 characters long.

profile(optional)
object

The user profile.

firstName(optional)

The first name of the user. For example, "John".

The value must be between 1 and 50 characters long.

lastName(optional)

The last name of the user. For example, "Doe".

The value must be between 1 and 50 characters long.

birthDate(optional)

The birth date of the user. For example, 1990-01-01.

The value must be a valid date in the format YYYY-MM-DD.

gender(optional)

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.
email(optional)

The email address of the user. For example, "john@example.com".

The value must be between 1 and 254 characters long.

alternateEmail(optional)

The alternate email address of the user, such as a work email address or a secondary email address.

The value must be between 1 and 254 characters long.

phone(optional)

The phone number of the user. For example, "+1 555 555 5555".

The value must be between 1 and 30 characters long.

alternatePhone(optional)

The alternate phone number of the user, such as a work phone number or a secondary phone number.

The value must be between 1 and 30 characters long.

address(optional)
object

The address of the user.

street(optional)

The street part of the user's address, like "123 Elm Street".

The value must be between 1 and 100 characters long.

district(optional)

The district or area of the user's address.

The value must be between 1 and 100 characters long.

city(optional)

The city of the user's address.

The value must be between 1 and 100 characters long.

region(optional)

The region, state, or province of the user's address.

The value must be between 1 and 100 characters long.

country(optional)

The country of the user's address.

The value must be between 1 and 100 characters long.

postalCode(optional)

The postal or ZIP code of the user's address.

The value must be between 1 and 20 characters long.

avatar(optional)

The URL of the user's avatar image.

The value must be a well-formed URL.

company(optional)

The company the user works for.

The value must be between 1 and 200 characters long.

companyUrl(optional)

The URL of the company the user works for.

The value must be a well-formed URL.

jobTitle(optional)

The job title of the user.

The value must be between 1 and 50 characters long.

custom(optional)
object

A map of custom attributes associated with the user.

The following restrictions apply to custom attributes:

  • Profiles support up to 10 custom attributes
  • Attribute names must be strings up to 20 characters, starting with a letter or underscore, followed by letters, digits, or underscores
  • Attributes can be primitives (strings, numbers, booleans, null) or collections (lists, maps)
  • Strings can be up to 100 characters long
  • Lists can contain up to 30 elements, including primitives, lists of primitives, or maps of primitives
  • Maps can contain up to 30 elements, including primitives, lists of primitives, or maps of primitives
  • Map keys must be strings up to 50 characters long

Processed properties

These properties are automatically tracked:

externalUserId
string

This property corresponds to the userId property provided in the input.

In the processed event, this property is referred to as userId to distinguish it from the unique identifier assigned internally to each user.

patch(optional)
object

A series of operations derived from the profile input property.

The patch created from the input profile is used internally to reflect changes in the user profile.

Payload examples

Below are some payload examples for this event:

123
{
"userId": "1ed2fd65-a027-4f3a-a35f-c6dd97537392"
}