Mixpanel API v0.8.1 Mixpanel
Elixir client for the Mixpanel API.
Summary
Functions
Stores a user profile
Arguments
distinct_id
- This is a string that identifies the profile you would like to update.operation
- A name for the eventvalue
- A collection of properties associated with this event.opts
- The options
Options
:ip
- The IP address associated with a given profile. If:ip
isn’t provided, Mixpanel will use the IP address of the request. Mixpanel uses an IP address to guess at the geographic location of users. If:ip
is set to “0”, Mixpanel will ignore IP information.:time
- Seconds since midnight, January 1st 1970, UTC. Updates are applied in:time
order, so setting this value can lead to unexpected results unless care is taken. If:time
is not included in a request, Mixpanel will use the time the update arrives at the Mixpanel server.:ignore_time
- If the:ignore_time
property is present andtrue
in your update request, Mixpanel will not automatically update the “Last Seen” property of the profile. Otherwise, Mixpanel will add a “Last Seen” property associated with the current time for all $set, $append, and $add operations.
Tracks an event.
Arguments
event
- A name for the eventproperties
- A collection of properties associated with this event.opts
- The options
Options
:distinct_id
- The value of distinct_id will be treated as a string, and used to uniquely identify a user associated with your event. If you provide a distinct_id property with your events, you can track a given user through funnels and distinguish unique users for retention analyses. You should always send the same distinct_id when an event is triggered by the same user.:time
- The time an event occurred. If present, the value should be a unix timestamp (seconds since midnight, January 1st, 1970 - UTC). If this property is not included in your request, Mixpanel will use the time the event arrives at the server.:ip
- An IP address string (e.g. “127.0.0.1”) associated with the event. This is used for adding geolocation data to events, and should only be required if you are making requests from your backend. If:ip
is absent, Mixpanel will ignore the IP address of the request.