The problem I needed to solve
Viewing a screen and clicking inside it are different behaviors. I needed entrance, exit and duration separately from button events.
Implementation in this snapshot
AnalyticsScreenTracker.Enter stores realtimeSinceStartup and calls the central entry path. Exit calculates duration only after an entry and clears isEntered.
The design decision and its cost
OnEnable and OnDisable can call these methods through configurable flags. screenId identifies the screen, and the central Analytics path defines its events.
Current boundaries
This duration describes component activation, not necessarily player attention. Calling Enter again can replace the starting point, and the tracker does not model a match’s foreground lifecycle.
Review scenarios and contract meaning
Source review revealed an important distinction: AnalyticsScreenTracker’s presence does not mean all its events are currently transmitted. The component calculates activation duration and calls the central path, but Analytics.cs’s EssentialEvent list excludes screen_enter and screen_exit. The current wrapper therefore filters interface-screen traffic. A callback is not evidence that PHP stored a record. Analytics review must distinguish data generation, local policy acceptance, queueing and server acceptance; each stage can stop an event.
The server supports generic event and report definitions, but defining a schema does not generate gameplay events. If screen observation becomes necessary, the client policy must be explicit and real code must send it through an authorized SDK path. A Number duration field requires an actual numeric value and averages can be grouped by screen. Missing or nonnumeric values do not enter numeric calculations, making type changes consequential. This tracker still measures component activity rather than player attention. Reopening a panel, disabling it on exit and application interruption matter more for defining duration than an attractive chart.
Deleting a tab or report does not delete stored events. Hiding a display therefore differs from stopping collection. Future review of this tracker should distinguish unwanted data, unwanted presentation and a changed contract. Those choices affect client and server differently and cannot substitute for one another by merely hiding a chart.
What this stage taught me
For me, duration without a definition is not useful. This tracker observes screen lifecycle; analysis still needs to know when the actual UI activates the screen and what exit means.




