Screen Views

Record screen-view events with the Ansight .NET SDK to improve session reconstruction, flow analysis, and AI summaries.

Ansight has dedicated screen-view helpers:

  • Runtime.ScreenViewed(string screenName)
  • Runtime.ScreenViewed(string screenName, string details)
  • Runtime.ScreenViewed(string screenName, byte channel)
  • Runtime.ScreenViewed(string screenName, byte channel, string details)

These are recorded as AppEventType.ScreenViewed.

Screen-view events are especially useful when you want Ansight or an AI agent to reconstruct a session later. They give the analysis pipeline explicit navigation breadcrumbs, which improves session timelines, flow reconstruction, and AI-generated summaries.

Minimal Example

Runtime.ScreenViewed("CheckoutPage");
Runtime.ScreenViewed("OrderSummaryPage", "route=/orders/summary");

.NET MAUI Page Example

For MAUI, the simplest pattern is to emit the screen-view event from OnAppearing():

using Ansight;

public partial class CheckoutPage : ContentPage
{
    protected override void OnAppearing()
    {
        base.OnAppearing();
        Runtime.ScreenViewed(nameof(CheckoutPage), "route=/checkout");
    }
}

That keeps the event tied to the actual page presentation instead of navigation intent.

When To Use details

Use details for route or presentation metadata you may want later during analysis:

  • route=/checkout
  • presentation=modal
  • tab=profile
  • entry=push-notification

Keep it compact and structured.

Better screen metadata produces better summaries. If your app records stable screen names plus lightweight route or presentation details, downstream analysis can extract much richer user-flow metadata.