LinkedIn engineers developed a new analytics system for iOS to overcome limitations posed by modern UI architectures. Traditional iOS analytics systems rely on `UIView` instances for measurement. However, contemporary UI designs increasingly utilize flattened layouts and custom rendering, where elements like cards and sections are represented by virtual nodes that do not materialize as `UIView`s.
This discrepancy leads to issues such as failure to capture impressions for virtual nodes, loss of logical hierarchy, inaccurate visibility calculations, and incorrect attribution of user actions when analytics are solely built around UIKit.
The solution from LinkedIn involves a shared `MeasurableNode` contract. This contract relaxes the requirement that every measurable UI element must be a `UIView`. A `MeasurableNode` exposes four key properties: identity, geometry, hierarchy, and lifecycle.
The `MeasurableNode` protocol includes `telemetryIdentity`, `frame`, `logicalParent`, `isAttached` properties, and `attach()` and `detach()` methods. This design allows both traditional `UIView`s and virtual nodes to integrate into the same analytics system.
With the `MeasurableNode` contract, existing UIKit views continue to use their native properties and lifecycle hooks. Virtual nodes, conversely, explicitly provide their corresponding information to the analytics layer. The `attach` and `detach` methods are crucial, as they enable the layout or rendering system to inform the analytics system about node attachment, frame changes, and detachment.
For user actions, since virtual nodes are not directly recognized by UIKit gesture recognizers, the rendering framework must traverse the hybrid UIKit/virtual-node hierarchy to correctly attribute actions to the logical virtual node.
This system design supports gradual adoption, meaning existing view-based analytics do not require a complete rewrite. Teams can modernize specific parts of the UI using virtual nodes while older view-based analytics continue to function alongside the new contract. This allows for incremental updates without disrupting the entire analytics infrastructure.
✨ This summary was generated by AI from the outlets' reporting listed below. It is not independently verified and may contain errors — check the original sources. How BrevFeed works →
One email each morning: the day's tech stories, clustered across outlets and summarized. No account needed.
One email a day. Unsubscribe in one click, any time.
Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.
▶ Play today's briefNew every morning, and the back catalogue is archived by date.
LinkedIn engineers created a view-agnostic analytics system for iOS to address challenges with modern UI architectures that use virtual nodes instead of traditional UIViews. This system uses a shared `MeasurableNode` contract, allowing both UIViews and virtual nodes to participate in analytics, ensuring accurate impression tracking and user action attribution in flattened UI layouts.