ExHeap
ExHeap is a very thin wrapper for the Heap Analytics Server Side API
It is meant to help manage the API headers, URLs, etc, but mostly pass through the data unedited.
Basic usage:
iex> ExHeap.track("user@example.com", "My Heap Event", %{"extra_id" => 1234})
{:ok, %HTTPoison.Response{...}}
iex> ExHeap.add_user_properties("user@example.com", %{"company_name" => "MegaCorp"})
{:ok, %HTTPoison.Response{...}}
Installation
If available in Hex, the package can be installed
by adding ex_heap
to your list of dependencies in mix.exs
:
def deps do
[
{:ex_heap, "~> 0.1.0"}
]
end
Then configure the ex_heap
app per environment like so:
config :ex_heap,
app_id: "123456789", # required
httpoison: [recv_timeout: 5000, timeout: 8000] # optional
You may also use environment variables:
config :ex_heap,
app_id: {:system, "HEAP_APP_ID"}
License
- ExHeap: See LICENSE file.