From e59c39caa078bc90740f7f00d06db50ed9b3594c Mon Sep 17 00:00:00 2001 From: Michael Gummelt Date: Wed, 13 May 2015 09:05:44 -0700 Subject: [PATCH] only identify a non-anonymous user --- cli/dcoscli/analytics.py | 5 +---- cli/dcoscli/config/main.py | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/cli/dcoscli/analytics.py b/cli/dcoscli/analytics.py index 11fa8af9b..b0e0e9597 100644 --- a/cli/dcoscli/analytics.py +++ b/cli/dcoscli/analytics.py @@ -85,10 +85,7 @@ def segment_identify(conf): if 'core.email' in conf: data = {'userId': conf.get('core.email')} - else: - data = {'anonymousId': session_id} - - _segment_request('identify', data) + _segment_request('identify', data) def _segment_request(path, data): diff --git a/cli/dcoscli/config/main.py b/cli/dcoscli/config/main.py index 157387a88..f1276d084 100644 --- a/cli/dcoscli/config/main.py +++ b/cli/dcoscli/config/main.py @@ -34,7 +34,7 @@ from dcos import (cmds, config, constants, emitting, http, jsonitem, subcommand, util) from dcos.errors import DCOSException -from dcoscli.analytics import segment_identify +from dcoscli import analytics emitter = emitting.FlatEmitter() @@ -162,7 +162,7 @@ def _set(name, value): if (name == 'core.reporting' and python_value is True) or \ (name == 'core.email'): - segment_identify(toml_config) + analytics.segment_identify(toml_config) _save_config_file(config_path, toml_config)