LinkedIn Decouples iOS Analytics From UIKit Views With a Shared Node Contract
LinkedIn engineers built an iOS analytics system that measures virtual UI nodes as well as UIViews, using a shared MeasurableNode contract. The design lets teams adopt flattened, custom-rendered layouts without rewriting existing view-based tracking.

TL;DR
- LinkedIn's iOS analytics no longer assumes every measured element is a UIView.
- A shared MeasurableNode contract lets UIViews and virtual nodes feed the same analytics layer.
- Teams can adopt the approach gradually, but must find and update code that assumes everything is a view.
The problem with view-based analytics
On iOS, analytics systems have traditionally treated UIView instances as the unit of measurement. That works when the screen's logical structure matches UIKit's view hierarchy. Modern UI architectures often break that match. They use flattened layouts and custom rendering, where elements such as cards, sections and containers exist as virtual nodes that never become UIViews.
As LinkedIn senior software engineer Keerthana Reddy Ragi explains, an analytics system built only around UIKit can miss impressions for these virtual nodes. It can also lose logical hierarchy and context, miscalculate visibility and impression duration, and attribute user actions to the wrong element.
The MeasurableNode contract
LinkedIn's answer is a shared protocol called MeasurableNode. It relaxes the requirement that every measurable element be a UIView. A MeasurableNode exposes four things: identity, geometry, hierarchy and lifecycle. Those are a telemetry identity, a frame, an optional logical parent, an attachment state, and attach and detach methods.
Because both UIViews and virtual nodes conform to the same contract, they can share one analytics layer. Existing UIKit views keep using native properties and lifecycle hooks. Virtual nodes supply the same information explicitly.
Attach and detach as the signal
The attach and detach methods carry most of the design. UIKit already sends lifecycle notifications to views automatically. Virtual nodes get none of that, so the layout or rendering system must call attach when a node appears, report frame changes, and call detach when it goes away. The source describes this as notifying analytics "when a node attaches, when its frame changes, and when it detaches".
User actions raise a similar issue. UIKit gesture recognizers cannot target virtual nodes directly. The rendering framework therefore has to walk the mixed hierarchy of UIKit views and virtual nodes to find the logical node that should receive an action.
Migration was the hard part
LinkedIn reported three main challenges. The first was the assumption that everything is a UIView, which was built into existing codebases. Ragi's examples include helper code that walked superviews, visibility checks that read frames directly from views, and cleanup logic tied to view removal. All of these had to be found and updated. The second was balancing short-term compatibility against long-term correctness. The third was enforcing attach and detach discipline at the framework level, so that callers could not skip it.
Ragi stresses that the design allows gradual adoption. Teams can modernize one part of a UI without rewriting the rest. Existing view-based analytics keeps working while newer virtual nodes use the new contract.
Why it matters
For iOS teams, the practical lesson is that analytics tied to UIView is a dependency on the rendering model. If your app mixes UIKit with SwiftUI, custom layout engines or hybrid frameworks, measuring logical elements rather than views avoids silent gaps in impression and click data. Any code that walks superviews, reads view frames for visibility, or cleans up on view removal deserves a review before you adopt a flattened layout.
The InfoQ article also notes that the approach is not specific to UIKit. Any platform where the logical UI tree diverges from the native view tree faces the same measurement problem. A commenter quoted in the piece, senior AI prompt engineer Artien Nadal, suggested the next step could be detecting automatically when a UI change breaks event tracking or changes what an event means. That idea is his, not a LinkedIn announcement.
Sources
This article was written by Blozhik from the reporting below. Read the originals for full detail.
InHow LinkedIn Built a View-Agnostic Analytics System for Modern iOS UI ArchitecturesInfoQKeep reading


