Try it free

User interaction instrumentation

  • Latest Dynatrace
  • Reference
  • Published Nov 11, 2026

The Dynatrace Flutter Plugin automatically captures every tap and reports it as a user interaction event. For a full conceptual overview, see User interactions. The sections below cover Flutter-specific behavior and instrumentation details.

Supported widgets

Every tap produces a ui_element.* event regardless of which widget receives it. A ui_element.responder.* group is added only when the plugin recognizes the widget as an interactive control.

The following table lists which widgets receive responder attribution:

WidgetResponder attributionNotes

ElevatedButton, TextButton, OutlinedButton, FilledButton, MaterialButton, CupertinoButton

Yes

Deactivated buttons do not receive responder attribution.

IconButton

Yes

Requires onPressed.

InkWell

Yes

Requires a tap handler to be attributed.

ListTile, CheckboxListTile, SwitchListTile, RadioListTile

Yes

Requires onTap or onLongPress.

PopupMenuButton, PopupMenuItem

Yes

FloatingActionButton

Yes

Chips, SegmentedButton, ExpansionTile

Yes

Attributed through their internal InkWell.

GestureDetector

No

Still captured via ui_element.*. When it's nested inside a recognized widget, it's attributed to that widget. Wrap custom tap targets in UserInteractionWidget to assign a stable name.

Switch, Checkbox, Slider

No

Still captured via ui_element.*.

BottomNavigationBar, NavigationBar

No

Still captured via ui_element.*.

Any other tapped widget

No

Still captured via ui_element.*.

Label resolution

The detected_name field in each interaction event is resolved using the following priority order. The first source with a value wins:

  1. masked state (if the widget is inside a masked UserInteractionWidget)
  2. customName from an enclosing UserInteractionWidget
  3. Semantics label
  4. Tooltip message
  5. IconButton tooltip, else its icon's semanticLabel
  6. Icon semanticLabel
  7. Text content
  8. RichText content
  9. ListTile title, else subtitle

If none of these sources apply, the widget's type name is used and name_origin is set to component.

Widget paths

Each interaction event includes a path describing the widget's position in the tree. Paths are constructed according to the following rules:

  • Filtering: Framework internals are excluded. Layout widgets (padding, centering), theming, media queries, scaffolding, and animation or scroll internals do not appear in paths.
  • Collapsing: Consecutive duplicate types are collapsed into a single segment.
  • Length limit: Paths longer than 25 segments are shortened in the middle.
  • List indexing: Items in a ListView, GridView, or sliver carry an index on the last segment, for example ListView/SliverList/ListTile/InkWell[3].

Obfuscation

In builds compiled with --obfuscate, Dart type names are mangled. Widget paths and type-name fallbacks become unreadable in that case.

To produce stable, human-readable labels in obfuscated builds, use one of the following:

  • UserInteractionWidget(customName: 'My label') on the widget
  • A Semantics label: Semantics(label: 'My label', child: ...)
  • A Tooltip message: Tooltip(message: 'My label', child: ...)

Custom naming with UserInteractionWidget

UserInteractionWidget lets you assign a stable name to any widget. Wrap the target widget and set customName to the name you want to appear in detected_name.

import 'package:dynatrace_flutter_plugin/dynatrace_flutter_plugin.dart';
// Instead of showing "ElevatedButton" as detected_name,
// this will show "LoginButton"
UserInteractionWidget(
customName: 'LoginButton',
child: ElevatedButton(
onPressed: () { /* handle login */ },
child: const Text('Log In'),
),
)

customName overrides detected_name only. It does not affect the widget path, view names, or any other instrumentation.

You can apply customName at multiple levels. A container-level name applies to all interactions resolved through it, and more specific names on child widgets take precedence.

To mask sensitive UI element names instead of renaming them, see Mask user interactions.

Relationship to user actions

User interactions and user actions are distinct events. Every tap produces an interaction event. A user action is created only when a tap is followed by a web request or view navigation within 100 ms.

For workflows the plugin cannot detect automatically—such as multi-step processes or background tasks—use createUserAction. See User action instrumentation for the full API.

Related tags
Digital Experience