You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
analytics/lib/plausible_web/controllers/api/funnels_controller.ex

26 lines
542 B
Elixir

defmodule PlausibleWeb.Api.FunnelsController do
use PlausibleWeb, :controller
def show(conn, _params) do
json(conn, %{
conversion_rate: "38%",
steps: [
%{
label: "Signup",
visitors: 31,
complete_percentage: "100%",
dropoff: 0,
dropoff_percentage: "61%"
},
%{
label: "Second goal",
visitors: 12,
complete_percentage: "38%",
dropoff: 19,
dropoff_percentage: "61%"
}
]
})
end
end