Skip to content

Latest commit

 

History

History
34 lines (27 loc) · 626 Bytes

README.md

File metadata and controls

34 lines (27 loc) · 626 Bytes

PlausibleProxy

  1. Add plausible_proxy to your mix dependencies
def deps do
  [
    {:plausible_proxy, "~> 0.1.1"}
  ]
end
  1. Add PlausibleProxy.Plug to your Endpoint before your router:
defmodule MyAppWeb.Endpoint do
  ...
  plug PlausibleProxy.Plug
  ...
  plug MyAppWeb.Router
end
  1. Add a script tag to your site referencing the local path:
<script
  defer
  data-domain="{MyAppWeb.Endpoint.config(:url)[:host]}"
  src="/js/plausible_script.js"
></script>

See PlausibleProxy.Plug for optional configuration.