View Source Mixpanel.Client (Mixpanel API v1.2.0)

Mixpanel API Client GenServer.

Summary

Functions

Returns a specification to start this module under a supervisor.

Creates an alias for a user profile.

Updates a user profile.

Types

@type alias_id() :: String.t()
@type distinct_id() :: String.t()
@type event() :: String.t() | map()
@type init_args() :: [
  Mixpanel.Config.option()
  | GenServer.option()
  | {Keyword.key(), Keyword.value()},
  ...
]
@type properties() :: map()

Functions

@spec child_spec(init_args()) :: %{
  id: Mixpanel.Client,
  start: {Mixpanel.Client, :start_link, [init_args(), ...]}
}

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

create_alias(server, alias_id, distinct_id)

View Source
@spec create_alias(module(), alias_id(), distinct_id()) :: :ok

Creates an alias for a user profile.

See Mixpanel.create_alias/2.

Link to this function

engage(server, batch, opts)

View Source
@spec engage(
  module(),
  [{distinct_id(), String.t(), map()}],
  Mixpanel.engage_options()
) :: :ok

Updates a user profile.

See Mixpanel.engage/4.

Link to this function

engage(server, distinct_id, operation, value, opts)

View Source
@spec engage(module(), distinct_id(), String.t(), map(), Mixpanel.engage_options()) ::
  :ok
@spec start_link(init_args()) :: :ignore | {:error, any()} | {:ok, pid()}
Link to this function

track(server, event, properties, opts)

View Source
@spec track(module(), event(), properties(), Mixpanel.track_options()) :: :ok

Tracks a event

See Mixpanel.track/3