anchor.diff:  
     _invoke([Object context]) => spark._testDriver.runTests();
   }
  +
  +// analytics code
  +
  +void _handleUncaughtException(error, StackTrace stackTrace) {
  +  // We don't log the error object itself because of PII concerns.
  +  String errorDesc = error != null ? error.runtimeType.toString() : '';
  +  String desc = '${errorDesc}\n${minimizeStackTrace(stackTrace)}'.trim();
  +
  +  _analyticsTracker.sendException(desc);
  +}
  +
  +bool get _isTrackingPermitted =>
  +    _analyticsTracker.service.getConfig().isTrackingPermitted();
  +
  +set _isTrackingPermitted(bool value) =>
  +    _analyticsTracker.service.getConfig().setTrackingPermitted(value);
  
positive.code:   ws.Workspace workspace;
    EditorManager editorManager;
    EditorArea editorArea;
    analytics.Tracker tracker = new analytics.NullTracker();
  
    preferences.PreferenceStore localPrefs;
    preferences.PreferenceStore syncPrefs;
  
negative.code:   void initAnalytics() {
      analytics.getService('Spark').then((service) {
        // Init the analytics tracker and send a page view for the main page.
        _analyticsTracker = service.getTracker(_ANALYTICS_ID);
        _analyticsTracker.sendAppView('main');
  
        // Track logged exceptions.
        Logger.root.onRecord.listen((LogRecord r) {
          if (r.level >= Level.SEVERE && r.loggerName != 'spark.tests') {
            _handleUncaughtException(r.error, r.stackTrace);
          }
        });
      });
    }
  
  