DEV Community

Cover image for Django Plausible Proxy
Roman Imankulov
Roman Imankulov

Posted on • Originally published at

Django Plausible Proxy

I released Django Plausible Proxy, a Django application to proxy requests and send server-side events to Plausible Analytics.

Plausible is a lightweight and open-source web analytics platform, a privacy-friendly alternative to Google Analytics. I started using it for Django side projects about a month ago and loved its minimalistic interface and "exactly what I need" type of reports.

Initially, the integration code lived inside the project, but as it grew in functionality, I extracted it in a separate package that is available on PyPI and GitHub.


Proxying allows a project owner concerned about missing data to see a complete picture. See Adblockers and using a proxy for analytics for the detailed outline of the problem and solution.

When installed and configured in and, the app proxies the HTTP requests as such:

https://<>/js/script.js ->
https://<>/api/event    ->
Enter fullscreen mode Exit fullscreen mode

Server-side events

Sending events from Python code lets you keep track of events that can't be recorded otherwise, such as API requests. In the code, it looks like this:

from plausible_proxy import send_custom_event
send_custom_event(request, name="Register", props={"plan": "Premium"})
Enter fullscreen mode Exit fullscreen mode

Top comments (0)