-
Plausible Analytics
Simple, open source, lightweight (< 1 KB) and privacy-friendly web analytics alternative to Google Analytics.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
defmodule ExWeb.Plugs.ClientIp do require Logger behaviour Plug def init(opts), do: opts def call(conn, _opts) do Logger.metadata(client_ip: get_ip(conn)) conn end # This code is from Plausible Analytics https://github.com/plausible/analytics/blob/3a1c9e67cd67d5cb1fec68a4dee34f8cd0e056fd/lib/plausible\_web/remote\_ip.ex def get_ip(conn) do forwarded_for = List.first(Plug.Conn.get_req_header(conn, "x-forwarded-for")) if forwarded_for do String.split(forwarded_for, ",") |> Enum.map(&String.trim/1) |> List.first() else to_string(:inet_parse.ntoa(conn.remote_ip)) end end end ```
Related posts
-
Austrian DSB: EU-US Data Transfers to Google Analytics Illegal
-
I built a new platform, using NextJS, for creating a blog & newsletter (and earning money from your readers). I focused on speed, simplicity, privacy, and beautiful design. I'd love to get some early feedback!
-
I Wrote an Open Source Analytics Platform in full Javascript in less than 30 Days.
-
We need to Speak about Google Code Quality
-
Show HN: Open-Source Ad-Free File Upload Service