Browser SDK

group

Associate a user with an organization or account.

Signature#

Use group when you want to analyze behavior at the organization, workspace, team, or account level. Associate the current user with a group, then add safe group traits such as plan, seat count, industry, or lifecycle stage. Do not use it to store arbitrary customer input or sensitive data.

FieldRequiredTypeDescription
groupIdtruestringIdentifies the organization, workspace, team, or account.
traitsfalseobjectA dictionary of safe attributes describing the group, such as plan, seat count, industry, address, website, and employees.
optionsfalseobjectA dictionary of options, including user identity, context, timestamp, and integration settings. Note: If you do not pass a properties object, pass an empty object (like '') before options.
callbackfalsefunctionRuns after dispatch processing. It may not execute if a device-mode library is blocked from loading.

By default, Ferno caches group traits in the browser's local storage and attaches them to each Group call, similar to how the Identify method works.

Reserved traits#

Use reserved traits only for their intended meanings. Custom traits are also supported.

TraitTypeDescription
addressobjectGroup address; may contain city, country, postalCode, state, or street.
avatarstringURL to the group avatar.
createdAtdateDate the group account was created; use ISO-8601.
descriptionstringGroup description.
emailstringGroup email address.
employeesstringNumber of employees, typically for companies.
idstringUnique group ID in your database.
industrystringIndustry the group belongs to.
namestringGroup name.
phonestringGroup phone number.
websitestringGroup website.
planstringGroup plan.