ADR-026: Product Analytics and Vendor Senders¶
Status: Accepted Deciders: @grokify Relates to: ADR-011 and ADR-012 (classification and privacy rights), ADR-019 (support requests, whose desks are vendor code)
Context¶
Applications built on SystemForge want to know how they are used: how many people sign up, reach the first useful result, and come back. Each one otherwise writes its own client for its analytics service, with its own answers to the same questions: whether a slow service can slow a request, what may be sent, and how a person is identified.
Decision¶
- SystemForge provides server-side product analytics in
analytics. It holds the event, the registry, ID hashing, validation and the queue, and no vendor. ASenderdelivers messages to a service. - Only registered events, with only their registered properties. An application declares its events, adding the standard ones if it wants them. A property whose name looks like personal data cannot be registered.
- People and organizations are keyed hashes. The key is the application's own, so people cannot be matched between applications. A hash is still personal data to whoever holds the key: an application covers it in its privacy policy and in erasure.
- Analytics never affects the product. Capturing an event does not block and does not fail. Events wait in a bounded queue, and are dropped and logged when it is full or a send fails.
- Off unless configured. Without a sender the client does nothing. SystemForge captures no event by itself. If it later reports events such as a sign-up, a host opts in, and can exclude accounts, such as children's.
- A vendor sender may be part of SystemForge when it imports no vendor
SDK. It is a subpackage that uses only the standard library and that no
other SystemForge package imports, so an application that does not choose
it does not compile it.
analytics/posthogis the first. An integration that imports a vendor's SDK belongs in anomni-*module, which contains the import. - No person profiles. The PostHog sender asks PostHog not to keep one, and not to look up a location from the server's address.
The browser side is @plexusone/analytics in systemforge-web: cookieless
page-view counting whose privacy settings a site cannot change. It is
published on its own, so an application that does not use it does not install
PostHog's client.
Consequences¶
- An application adds analytics with its event list, a sender and a key.
- A failed batch is lost: there are no retries. Analytics is an estimate and must not be used for billing, limits or audit.
- Support desks (ADR-019) are unchanged: they stay out of SystemForge.
Alternatives considered¶
- PostHog's Go SDK. It adds retries, feature flags and error tracking,
which are not needed, and its own default properties and queue. If they
are needed, an
omni-*module implementsSenderwith it. - omnidxi. Its tracker identifies users by ID with traits and groups. It has no registry and no hashing, which are the point here.