(backend) introduce a configurable analytics system

Add an analytics abstraction that allows configuring which analytics
solution the app uses. PostHog is implemented as one backend, but by
default no analytics backend is activated.

The goal is to track events in a sufficiently organized way and to
let any developer implement their own backend as long as it follows
the same protocol.
This commit is contained in:
lebaudantoine
2026-07-01 18:33:12 +02:00
committed by aleb_the_flash
parent be0d0927d4
commit 9ba97fd14f
7 changed files with 464 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
"""Catalog of all analytics events emitted by the backend."""
from enum import StrEnum
class AnalyticsEvent(StrEnum):
"""All trackable events. Values are the wire names sent to the provider."""
# Rooms
ROOM_CREATED = "room_created"