Auto-generated selectors
Engineering · 5 min read

Unlock instant, code-linked insights in your Compose and SwiftUI apps with Fullstory’s auto-generated selectors

Modern mobile development is all about creating seamless, engaging experiences, and declarative UI frameworks like Android Jetpack Compose and Apple SwiftUI are key to making that happen. But here's the rub: understanding how users are actually interacting with those experiences can be surprisingly hard. Traditional methods for capturing UI element interactions—think manual tagging and code instrumentation—just weren't built for the speed and complexity of Compose and SwiftUI. They bog down engineering teams and leave you with a blurry picture of the user experience.  

That’s why we’re excited to introduce Fullstory’s auto-generated selectors, which automatically identify and capture UI elements in your Compose and SwiftUI applications. This powerful feature delivers instant, code-level clarity, so you can ditch the manual tagging.

Manual tagging just doesn't cut it

The reality today is that teams building with Compose and SwiftUI face a real challenge: getting detailed insights into user behavior is a painful process that demands significant engineering effort. Developers are often stuck manually instrumenting their code to tag UI elements for analytics platforms like Fullstory. This code-first approach isn't just time-intensive and error-prone; it's a development cycle killer. This means a slower time to value because you're waiting longer for crucial insights, as well as wasted engineering time because developers are tied up in instrumentation instead of building.

Forget about easy retroactive analysis. You miss out on valuable insights from past sessions, data quality becomes questionable due to inconsistent tagging, and the complexity of it all makes adoption a struggle. To add insult to injury, UI code changes break existing instrumentation, leading to even more maintenance work.

See what your code sees

Fullstory’s auto-generated selectors introduce a fundamental shift in mobile app analytics. We automatically reconstruct the UI hierarchy at build time, creating a smart connection between your Compose or SwiftUI code and what you see in Fullstory. This means you get a detailed, accurate view of user interactions automatically.  

For example, the following preview...

code screenshot

...would generate the below selectors (with composeSelectorVersion set to 4 or higher).

without auto selectors vs. with auto selectors

Why this matters

Here’s what auto-generated selectors bring to the table:

  • Effortless insights: Right away, you get code-linked data from your Compose and SwiftUI apps—no manual tagging needed. This means faster decision-making based on accurate data.

  • Developer velocity: Engineers can focus on what they do best—building—instead of wrestling with instrumentation. This frees up valuable resources and accelerates product development.

  • Retroactive superpowers: Go back and analyze past sessions with rich, code-accurate detail. Unlock insights you never thought possible and identify missed opportunities.

  • Code-level precision: See a clear, one-to-one map between your code and user behavior. This ensures accurate analysis and reliable results.

  • Privacy control: Get granular control over what data you capture. Because auto-selectors closely mirror your original code, it's easier and less error-prone to create effective privacy rules, helping you stay compliant and build trust.

  • Clear code mapping: We automatically identify elements, giving you readable selectors tied directly to your code—no more cryptic IDs. This simplifies collaboration and saves time in debugging. 

  • Fast activation: Start capturing those insights fast. Reduce your time to value and begin optimizing your app immediately.  

What you can do with it

Auto-generated selectors bring powerful new ways to understand and improve your app experience to different roles in your organization: 

For product managers:

  • Fine-tune funnels: Get super-specific with your conversion analysis. Go beyond basic screen views and define granular conversion funnels based on interactions with specific UI components within your Compose and SwiftUI flows, gaining deeper insights into user drop-off points.  

  • Target like a pro: Segment users based on interactions with particular elements in your modern UI, enabling more personalized in-app messaging or experiments.  

  • A/B tests, simplified: Easily analyze the performance of different UI variations in A/B tests by accurately tracking interactions with the specific Compose and SwiftUI elements being tested.  

  • Collaboration boost: Facilitate clearer communication between product, design, and engineering teams by providing a unified and easily understandable representation of UI interactions tied directly to the codebase.  

For mobile engineer leads:

  • Nail those bugs: Quickly and precisely pinpoint and reproduce user-reported bugs by easily identifying the exact UI elements involved in the session replay without needing to ask developers for specific element IDs or tags.  

  • Proactive support triggers: Set up alerts based on user interactions with specific UI elements that might indicate frustration or confusion, allowing support teams to reach out proactively.  

  • Search smarter: Quickly find user sessions based on interactions with specific UI elements by leveraging the automatically generated, code-consistent selectors.  

  • Privacy, protected: Precisely identify UI elements for exclusion or masking in compliance with privacy regulations, simplifying the process of protecting sensitive user data within modern UI frameworks.  

  • Onboarding, simplified: New team members can quickly understand user behavior by inspecting sessions with clearly labeled UI elements that directly mirror the application's code structure.  

Why Fullstory stands out

Fullstory's auto-generated selectors are a game-changer. The truth is, few—if any—other solutions offer this level of automatic element identification and retroactive analysis, mainly because it's a seriously complex problem to solve. Our innovative approach bridges the gap between your code and the user's experience, giving you unmatched clarity and efficiency. We're empowering teams to focus on building awesome apps, while Fullstory seamlessly captures the rich behavioral data you need to truly understand and improve the mobile user experience.

author

Kelsey Winiarski

Technical Product Marketing Manager