analytics v0.3.0 Analytics.Mixpanel

Link to this section Summary

Functions

Appends each to a list associated with the corresponding property name. Appending to a property that doesn’t exist will result in assigning a list with one element to that property

When processed, the property values are added to the existing values of the properties on the profile. If the property is not present on the profile, the value will be added to 0. It is possible to decrement by calling “$add” with negative values. This is useful for maintaining the values of properties like “Number of Logins” or “Files Uploaded”

Updates the profile attribute. If the profile does not exist, it creates it with these properties. If it does exist, it sets the properties to these values, overwriting existing values

Works just like set/2, except it will not overwrite existing property values. This is useful for properties like “First login date”

Adds a transactions to the individual user profile, which will also be reflected in the Mixpanel Revenue report

The list values in the request are merged with the existing list on the user profile, ignoring duplicates

Link to this section Functions

Link to this function append(distinct_id, key, value)

Appends each to a list associated with the corresponding property name. Appending to a property that doesn’t exist will result in assigning a list with one element to that property.

Link to this function increment(distinct_id, key, value \\ 1)

When processed, the property values are added to the existing values of the properties on the profile. If the property is not present on the profile, the value will be added to 0. It is possible to decrement by calling “$add” with negative values. This is useful for maintaining the values of properties like “Number of Logins” or “Files Uploaded”.

Link to this function set(distinct_id, key, value)

Updates the profile attribute. If the profile does not exist, it creates it with these properties. If it does exist, it sets the properties to these values, overwriting existing values.

Link to this function set_once(distinct_id, key, value)

Works just like set/2, except it will not overwrite existing property values. This is useful for properties like “First login date”.

Link to this function track(distinct_id, event, properties \\ %{})

Tracks an event.

Link to this function track_charge(distinct_id, amount, metadata \\ %{})

Adds a transactions to the individual user profile, which will also be reflected in the Mixpanel Revenue report.

Link to this function union(distinct_id, key, list)

The list values in the request are merged with the existing list on the user profile, ignoring duplicates.