Mxpanel.Event (Mxpanel v0.1.0) View Source

Struct representing a Mixpanel Event

Link to this section Summary

Functions

Serialize a event into the format expected by the Mixpanel API.

Link to this section Types

Specs

t() :: %Mxpanel.Event{
  additional_properties: %{},
  distinct_id: term(),
  insert_id: String.t(),
  name: String.t(),
  time: integer()
}

Link to this section Functions

Link to this function

new(name, distinct_id, additional_properties \\ %{})

View Source

Specs

new(String.t(), String.t(), map()) :: t()

Create a new event.

Mxpanel.Event.new("signup", "13793", %{"Favourite Color" => "Red"})

Specs

serialize(t(), String.t()) :: map()

Serialize a event into the format expected by the Mixpanel API.