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

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.

Tracks a event

Types

@type active() :: boolean()
@type alias_id() :: String.t()
@type base_url() :: String.t()
@type distinct_id() :: String.t()
@type event() :: String.t() | map()
@type init_args() :: [option() | GenServer.option(), ...]
@type option() ::
  {:project_token, project_token()}
  | {:active, active()}
  | {:base_url, base_url()}
@type project_token() :: String.t()
@type properties() :: map()
@type state() :: %{
  project_token: project_token(),
  active: active(),
  base_url: base_url()
}

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(alias, distinct_id)

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

Creates an alias for a user profile.

See Mixpanel.create_alias/2.

@spec engage(event() | [event()]) :: :ok

Updates a user profile.

See Mixpanel.engage/4.

@spec start_link(init_args()) :: :ignore | {:error, any()} | {:ok, pid()}
Link to this function

track(event, properties)

View Source
@spec track(event(), properties()) :: :ok

Tracks a event

See Mixpanel.track/3