# Group

    open class Group

Access to the Mixpanel Groups API, available through the getGroup function from the main Mixpanel instance.

### Group

- `set(properties:)`

  Sets properties on this group.

  Property keys must be String objects and the supported value types need to conform to MixpanelType. MixpanelType can be either String, Int, UInt, Double, Float, Bool, [MixpanelType], [String: MixpanelType], Date, URL, or NSNull. If the existing group record on the server already has a value for a given property, the old value is overwritten. Other existing properties will not be affected.

  #### Declaration

  Swift

      open func set(properties: Properties)

  #### Parameters

  `properties` | properties dictionary

- `set(property:to:)`

  Convenience method for setting a single property in Mixpanel Groups.

  Property keys must be String objects and the supported value types need to conform to MixpanelType. MixpanelType can be either String, Int, UInt, Double, Float, Bool, [MixpanelType], [String: MixpanelType], Date, URL, or NSNull.

  #### Declaration

  Swift

      open func set(property: String, to: MixpanelType)

  #### Parameters

  `property` | property name
  `to` | property value

- `setOnce(properties:)`

  Sets properties on the current Mixpanel Group, but doesn’t overwrite if there is an existing value.

  This method is identical to `set:` except it will only set properties that are not already set. It is particularly useful for collecting data about dates representing the first time something happened.

  #### Declaration

  Swift

      open func setOnce(properties: Properties)

  #### Parameters

  `properties` | properties dictionary

- `unset(property:)`

  Remove a property and its value from a group’s profile in Mixpanel Groups.

  For properties that don’t exist there will be no effect.

  #### Declaration

  Swift

      open func unset(property: String)

  #### Parameters

  `property` | name of the property to unset

- `remove(key:value:)`

  Removes list properties.

  Property keys must be String objects and the supported value types need to conform to MixpanelType. MixpanelType can be either String, Int, UInt, Double, Float, Bool, [MixpanelType], [String: MixpanelType], Date, URL, or NSNull.

  #### Declaration

  Swift

      open func remove(key: String, value: MixpanelType)

  #### Parameters

  `properties` | mapping of list property names to values to remove

- `union(key:values:)`

  Union list properties.

  Property values must be array objects.

  #### Declaration

  Swift

      open func union(key: String, values: [MixpanelType])

  #### Parameters

  `properties` | mapping of list property names to lists to union

- `deleteGroup()`

  Delete group’s record from Mixpanel Groups.

  #### Declaration

  Swift

      open func deleteGroup()

© 2026 Mixpanel. All rights reserved. (Last updated: 2026-04-07)

Generated by jazzy ♪♫ v0.15.4, a Realm project.