LingEx
All module documentation

lingex-measurement

LingEx Measurement

Source details
Source revision
213d362df7bfa63b98f2da6bd0fb879895da3346
Source SHA-256
4c26529ff72dae41e2e915a122929a671ab086321c2cc7f94004e1d2c978116c

LingEx Measurement

lingex-measurement is the dedicated first-party measurement module for LingEx. It provides reusable, typed contracts for pseudonymous measurement subjects, visits, product/site events, aggregate SEO acquisition imports, rollups and purpose-scoped linkage.

Measurement is separate from Auth identity, anonymous continuity, learner progress, advertising and learning-decision policy. Raw measurement events do not require an Auth user or guest ID, and a measurement subject cannot authenticate. Persistent measurement and linkage modes are controlled by the approved jurisdictional policy; this foundation does not enable them by itself.

The deterministic Search Console acquisition command reads final page/day data through Google's read-only API using privately stored Desktop OAuth; a separate Publication-owner-service reconciler admits only known public canonical routes. Unknown/protected page rows are counted as coverage limitations, not guessed. Aggregate SEO and already-permitted on-site outcomes can be compared by date and route without any search-query-to-person linkage. No third-party analytics provider, Google write permission or AI model is required.

The module contributes an ownership manifest and additive, idempotent schema foundation. Persistence holds and resolves the frozen migration source and owns central migration orchestration; this repository owns measurement table semantics, subject issuance and typed ingestion contracts. Ingestion is fail-closed by mode, stores no direct Auth identity, and is idempotent by canonical event key. Its API contribution provides the bounded POST /v1/measurement/events event-ingestion route; ordinary public requests are ephemeral-only and persistent measurement cannot be enabled by a browser request.