View Source Hedgex (hedgex v0.3.4)

General methods for the Posthog API.

Summary

Types

@type event() :: %{
  :event => String.t(),
  :distinct_id => any(),
  optional(:properties) => map(),
  optional(:timestamp) => DateTime.t()
}

Functions

@spec capture(event :: event()) :: :ok | {:error, :queue_full}

See Hedgex.Capture.capture/1.

Link to this function

decide(distinct_id, opts \\ [])

View Source
@spec decide(distinct_id :: any(), opts :: Keyword.t()) ::
  {:ok, map()} | {:error, Exception.t()}

See Hedgex.Api.decide/2.

Link to this function

identify(distinct_id, properties)

View Source

Add metadata properties to users in PostHog.

See: https://posthog.com/docs/api/capture#identify

@spec queue_size() :: pos_integer() | 0

See Hedgex.Capture.queue_size/0.