Mxpanel.Groups (Mxpanel v1.0.1) View Source
Functions to manipulate group profiles.
Shared Options
All of the functions in this module accept the following options:
:time- Specific timestamp in seconds of the event. Defaults toSystem.os_time(:second).
Link to this section Summary
Functions
Deletes a group profile from Mixpanel.
Removes a specific value in a list property.
Updates or adds properties to a group profile. The profile is created if it does not exist.
Adds properties to a group only if the property is not already set. The profile is created if it does not exist.
Adds the specified values to a list property on a group profile and ensures that those values only appear once.
Unsets specific properties on the group profile.
Link to this section Functions
Specs
delete(String.t(), String.t(), Keyword.t()) :: Mxpanel.Operation.t()
Deletes a group profile from Mixpanel.
"Company"
|> Mxpanel.Groups.delete("Mixpanel")
|> Mxpanel.deliver(client)
Specs
Removes a specific value in a list property.
"Company"
|> Mxpanel.Groups.remove_item("Mixpanel", "Items purchased", "t-shirt")
|> Mxpanel.deliver(client)
Specs
set(String.t(), String.t(), map(), Keyword.t()) :: Mxpanel.Operation.t()
Updates or adds properties to a group profile. The profile is created if it does not exist.
properties = %{"Address" => "1313 Mockingbird Lane"}
"Company"
|> Mxpanel.Groups.set("Mixpanel", properties)
|> Mxpanel.deliver(client)
Specs
set_once(String.t(), String.t(), map(), Keyword.t()) :: Mxpanel.Operation.t()
Adds properties to a group only if the property is not already set. The profile is created if it does not exist.
properties = %{"Address" => "1313 Mockingbird Lane"}
"Company"
|> Mxpanel.Groups.set_once("Mixpanel", properties)
|> Mxpanel.deliver(client)
Specs
union(String.t(), String.t(), map(), Keyword.t()) :: Mxpanel.Operation.t()
Adds the specified values to a list property on a group profile and ensures that those values only appear once.
properties = %{"Items purchased" => ["socks", "shirts"], "Browser" => "ie"}
"Company"
|> Mxpanel.Groups.union("Mixpanel", properties)
|> Mxpanel.deliver(client)
Specs
unset(String.t(), String.t(), [String.t()], Keyword.t()) :: Mxpanel.Operation.t()
Unsets specific properties on the group profile.
property_names = ["Items purchased"]
"Company"
|> Mxpanel.Groups.unset("Mixpanel", property_names)
|> Mxpanel.deliver(client)