analytics v0.1.0 Analytics.Mixpanel.Events
This module provides a struct that accumulates user events and helper to submit data to Mixpanel.
Link to this section Summary
Functions
Creates a new Events
struct that is used to submit events for a client identified with distinct_id
The IP address associated with a given profile, which Mixpanel uses to guess user geographic location. Ignored if not set
Submits events tracked for a user
Appends an event to a Events
struct
Link to this section Functions
Link to this function
new(distinct_id)
Creates a new Events
struct that is used to submit events for a client identified with distinct_id
.
Link to this function
set_ip(batch_request, ip)
The IP address associated with a given profile, which Mixpanel uses to guess user geographic location. Ignored if not set.
Link to this function
submit(batch_request)
Submits events tracked for a user.
Link to this function
track(batch_request, event, properties \\ %{})
Appends an event to a Events
struct.
Arguments
event
- A name for the eventproperties
- A collection of properties associated with this event. Where:time
(timestamp) would update event time (otherwise Mixpanel uses time when event is arrived to their back-end),distinct_id
can be used to identify user and:token
can be used to override Mixpanel API key.