Current section
3 Versions
Jump to
Current section
3 Versions
Compare versions
3
files changed
+16
additions
-10
deletions
| @@ -5,22 +5,28 @@ An Elixir client for the Mixpanel HTTP API. See mixpanel.com. | |
| 5 5 | ## Usage |
| 6 6 | 1) Add mixpanel to your deps: |
| 7 7 | |
| 8 | - ``` |
| 9 | - {:mixpanel, "0.1.0"} |
| 8 | + ```elixir |
| 9 | + {:mixpanel, "0.0.1"} |
| 10 10 | ``` |
| 11 11 | |
| 12 | - 2) Add `:mixpanel` to your applications. |
| 12 | + 2) Add `:mixpanel` to the list of application dependencies in your `mix.exs`. |
| 13 | + |
| 14 | + ```elixir |
| 15 | + def application do |
| 16 | + [applications: [:logger, :mixpanel]] |
| 17 | + end |
| 18 | + ``` |
| 13 19 | |
| 14 20 | 3) Add your mixpanel token to your `config/config.exs` (or similar): |
| 15 21 | |
| 16 | - ``` |
| 17 | - config :mixpanel, token: <YOUR API TOKEN HERE> |
| 22 | + ```elixir |
| 23 | + config :mixpanel, token: "<YOUR API TOKEN HERE>" |
| 18 24 | ``` |
| 19 25 | |
| 20 26 | 4) Track events with `Mixpanel.track`: |
| 21 27 | |
| 22 | - ``` |
| 23 | - Mixpanel.track("login", [distinct_id: 123]) |
| 28 | + ```elixir |
| 29 | + Mixpanel.track("login", distinct_id: 123) |
| 24 30 | Mixpanel.track("visited TOS") |
| 25 31 | ``` |
| @@ -12,4 +12,4 @@ | |
| 12 12 | {<<"name">>,<<"mixpanel">>}. |
| 13 13 | {<<"requirements">>, |
| 14 14 | #{<<"exjsx">> => #{<<"app">> => <<"exjsx">>,<<"optional">> => nil,<<"requirement">> => <<"~> 3.1.0">>}}}. |
| 15 | - {<<"version">>,<<"0.0.1">>}. |
| 15 | + {<<"version">>,<<"0.0.2">>}. |
| @@ -3,7 +3,7 @@ defmodule Mixpanel.Mixfile do | |
| 3 3 | |
| 4 4 | def project do |
| 5 5 | [app: :mixpanel, |
| 6 | - version: "0.0.1", |
| 6 | + version: "0.0.2", |
| 7 7 | elixir: "~> 1.0", |
| 8 8 | deps: deps, |
| 9 9 | |
| @@ -17,7 +17,7 @@ defmodule Mixpanel.Mixfile do | |
| 17 17 | end |
| 18 18 | |
| 19 19 | def application do |
| 20 | - [applications: [:logger], |
| 20 | + [applications: [:logger, :inets], |
| 21 21 | env: [token: nil], |
| 22 22 | mod: {Mixpanel, []}] |
| 23 23 | end |