Group

open class Group

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

Group

  • 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

  • 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

  • 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

  • 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

  • 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 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

  • Delete group’s record from Mixpanel Groups.

    Declaration

    Swift

    open func deleteGroup()