Exemple #1
0
        private Dict GetPage(Dictionary <string, object> data)
        {
            var page = new Segment.Model.Dict();

            if (data != null)
            {
                if (data.ContainsKey("path"))
                {
                    page.Add("path", (string)data["path"]);
                }
                if (data.ContainsKey("search"))
                {
                    page.Add("search", (string)data["search"]);
                }
                if (data.ContainsKey("url"))
                {
                    page.Add("url", (string)data["url"]);
                }
            }

            return(page);
        }
Exemple #2
0
        private Dict GetCampaign(Dictionary <string, object> data)
        {
            var campaign = new Segment.Model.Dict();

            if (data != null)
            {
                foreach (string key in data.Keys)
                {
                    campaign.Add(key, data[key]);
                }
            }

            return(campaign);
        }