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.
| Field | Required | Type | Description |
|---|---|---|---|
groupId | true | string | Identifies the organization, workspace, team, or account. |
traits | false | object | A dictionary of safe attributes describing the group, such as plan, seat count, industry, address, website, and employees. |
options | false | object | A 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. |
callback | false | function | Runs 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.
| Trait | Type | Description |
|---|---|---|
address | object | Group address; may contain city, country, postalCode, state, or street. |
avatar | string | URL to the group avatar. |
createdAt | date | Date the group account was created; use ISO-8601. |
description | string | Group description. |
email | string | Group email address. |
employees | string | Number of employees, typically for companies. |
id | string | Unique group ID in your database. |
industry | string | Industry the group belongs to. |
name | string | Group name. |
phone | string | Group phone number. |
website | string | Group website. |
plan | string | Group plan. |