예제 #1
0
        public void SetUser(string identifier, Dictionary <string, string> userProperties)
        {
            if (Enabled)
            {
                var traits = new Segment.Model.Traits();
                foreach (var userProperty in userProperties)
                {
                    traits.Add(userProperty.Key, userProperty.Value);
                }

                Analytics.Client.Identify(identifier, traits);

                Analytics.Client.Alias(_userIdentifier, identifier);
                _userIdentifier = identifier;
            }
        }
        public void SetUser(string identifier, Dictionary<string, string> userProperties)
        {
            if (Enabled) {
                var traits = new Segment.Model.Traits ();
                foreach (var userProperty in userProperties) {
                    traits.Add (userProperty.Key, userProperty.Value);
                }

                Analytics.Client.Identify (identifier, traits);

                Analytics.Client.Alias (_userIdentifier, identifier);
                _userIdentifier = identifier;
            }
        }