Mxpanel.Event.new

You're seeing just the function new, go back to Mxpanel.Event module for more information.
Link to this function

new(name, distinct_id, additional_properties \\ %{}, opts \\ [])

View Source

Specs

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

Create a new event.

Mxpanel.Event.new("signup", "13793")
Mxpanel.Event.new("signup", "13793", %{"Favourite Color" => "Red"})
Mxpanel.Event.new("signup", "13793", %{}, ip: "72.229.28.185")
Mxpanel.Event.new("signup", "13793", %{}, time: 1624811298)

Options

  • :time - Specific timestamp in seconds of the event. Defaults to System.os_time(:second).

  • :ip - IP address to get automatic geolocation info.