Skip to content

Commit

Permalink
Add a ga hit when an inspector tree node is selected (#3906)
Browse files Browse the repository at this point in the history
  • Loading branch information
kenzieschmoll authored Mar 21, 2022
1 parent 0fbe3e1 commit 017b612
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/devtools_app/lib/src/analytics/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ const String togglePlatform = 'togglePlatform';
const String selectWidgetMode = 'selectWidgetMode';
const String enableOnDeviceInspector = 'enableOnDeviceInspector';
const String showOnDeviceInspector = 'showInspector';
const String treeNodeSelection = 'treeNodeSelection';

// Performance UX actions:
const refreshTimelineEvents = 'refreshTimelineEvents';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

import '../../analytics/analytics.dart' as ga;
import '../../analytics/constants.dart' as analytics_constants;
import '../../config_specific/logger/logger.dart';
import '../../primitives/auto_dispose_mixin.dart';
import '../../primitives/utils.dart';
Expand Down Expand Up @@ -410,6 +412,10 @@ class InspectorTreeController extends Object

void onSelectNode(InspectorTreeNode node) {
selection = node;
ga.select(
analytics_constants.inspector,
analytics_constants.treeNodeSelection,
);
expandPath(node);
}

Expand Down

0 comments on commit 017b612

Please sign in to comment.