Skip to main content
Version: Vue SDK

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:

ParameterTypeRequiredDescription
groupNamestringYesThe group name (e.g. company name, cohort name)
groupTypestringNoThe group type (e.g. "company", "cohort", "plan")
groupPropertiesPropertyRecordNoProperties 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>