Classes
Methods
remove(name, value)
Remove value from a list-valued property only if it is already present in the list.
If the property does not currently exist, the remove will be ignored.
If the property exists and is not list-valued, the remove will be ignored.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | the Group Analytics list-valued property that should have a value removed |
value |
any | the value that will be removed from the list |
set(prop, to)
Sets a single property with the given name and value for this group.
The given name and value will be assigned to the user in Mixpanel Group Analytics,
possibly overwriting an existing property with the same name.
Parameters:
Name | Type | Description |
---|---|---|
prop |
string | The name of the Mixpanel property. This must be a String, for example "Zip Code" |
to |
string | The value to set on the given property name. For "Zip Code", this value might be the String "90210" |
setOnce(prop, to)
Works just like groupSet() except it will not overwrite existing property values. This is useful for properties like "First login date".
Parameters:
Name | Type | Description |
---|---|---|
prop |
string | The name of the Mixpanel property. This must be a String, for example "Zip Code" |
to |
string | The value to set on the given property name. For "Zip Code", this value might be the String "90210" |
union(name, value)
Adds values to a list-valued property only if they are not already present in the list.
If the property does not currently exist, it will be created with the given list as its value.
If the property exists and is not list-valued, the union will be ignored.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | name of the list-valued property to set or modify |
value |
array | an array of values to add to the property value if not already present |
unset(prop)
Permanently removes the property with the given name from the group's profile
Parameters:
Name | Type | Description |
---|---|---|
prop |
string | name of a property to unset |