Group assignation
Assign users to segments (cohorts), optionally with properties.
Requirements:
- Group type and group id must be less than 128 characters.
- Authorized characters: alphanumeric,
-,_,.,,/,:.
import * as Screeb from "@screeb/sdk-browser";
Screeb.identityGroupAssign("company", "Apple");
Screeb.identityGroupAssign("plan", "Growth");
Default group type
Screeb.identityGroupAssign("cohort-42"); // default group type
Group id vs group name
Use an immutable group id with a human-readable name as a property:
Screeb.identityGroupAssign("company", "nuR4eecu", { name: "Apple" });
Unassign group
Screeb.identityGroupUnassign("company", "Apple");
With attributes
Screeb.identityGroupAssign("company", "Apple", {
address_line_1: "Apple Campus",
city: "Cupertino",
country: "United States",
});