Group assignation
Assign users to groups (e.g. company, cohort, plan) to enable group-level targeting and analytics.
Assign to a group
<script setup lang="ts">
import { useScreeb } from "@screeb/sdk-vue";
const { identityGroupAssign } = useScreeb();
await identityGroupAssign(
"company",
"Apple",
{
address_line_1: "Apple Campus",
address_line_2: "1 Infinite Loop",
city: "Cupertino",
zipcode: 95014,
state: "California",
country: "United States",
}
);
</script>
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
groupName | string | Yes | The group name (e.g. company name, cohort name) |
groupType | string | No | The group type (e.g. "company", "cohort", "plan") |
groupProperties | PropertyRecord | No | Properties of the group |
Unassign from a group
<script setup lang="ts">
import { useScreeb } from "@screeb/sdk-vue";
const { identityGroupUnassign } = useScreeb();
await identityGroupUnassign("company", "Apple");
</script>