private void TrackTemplate(string templateID, string templateName, string templateType)
        {
            // Get the file path where the settings are being stored.
            var  rootDir   = Environment.ExpandEnvironmentVariables(@"%localappdata%\LigerShark\SideWaffle\");
            var  filePath  = Path.Combine(rootDir, "SideWaffle-Settings.json");
            bool telemetry = SettingsStore.ReadJsonFile(filePath).SendTelemetry;

            if (telemetry)
            {
                var category = templateType;
                if (string.Compare("Project", templateType, StringComparison.OrdinalIgnoreCase) == 0)
                {
                    category = "project-template";
                }
                else if (string.Compare("Item", templateType, StringComparison.OrdinalIgnoreCase) == 0)
                {
                    category = "item-template";
                }

                var result = GetHashString(Environment.UserDomainName + Environment.MachineName);

                GoogleAnalyticsApi tracker = new GoogleAnalyticsApi("UA-62483606-4", result);
                tracker.TrackEvent(category, "add", templateName);
            }
        }
Example #2
0
        private void TrackTemplate(string templateID, string templateName)
        {
            var result = GetHashString(Environment.UserDomainName + Environment.MachineName);

            GoogleAnalyticsApi tracker = new GoogleAnalyticsApi("UA-62483606-4", result);

            tracker.TrackEvent("template", "add", templateName);
        }
        private void TrackTemplate(string templateID, string templateName, string templateType)
        {
            var result = GetHashString(Environment.UserDomainName + Environment.MachineName);
            var category = templateType;
            if (string.Compare("Project", templateType, StringComparison.OrdinalIgnoreCase) == 0)
            {
                category = "project-template";
            }
            else if (string.Compare("Item", templateType, StringComparison.OrdinalIgnoreCase) == 0)
            {
                category = "item-template";
            }

            GoogleAnalyticsApi tracker = new GoogleAnalyticsApi("UA-62483606-4", result);
            tracker.TrackEvent(category, "add", templateName);
        }
Example #4
0
        private void TrackTemplate(string templateID, string templateName, string templateType)
        {
            var result   = GetHashString(Environment.UserDomainName + Environment.MachineName);
            var category = templateType;

            if (string.Compare("Project", templateType, StringComparison.OrdinalIgnoreCase) == 0)
            {
                category = "project-template";
            }
            else if (string.Compare("Item", templateType, StringComparison.OrdinalIgnoreCase) == 0)
            {
                category = "item-template";
            }

            GoogleAnalyticsApi tracker = new GoogleAnalyticsApi("UA-62483606-4", result);

            tracker.TrackEvent(category, "add", templateName);
        }
        private void TrackTemplate(string templateID, string templateName, string templateType)
        {
            // Get the file path where the settings are being stored.
            var rootDir = Environment.ExpandEnvironmentVariables(@"%localappdata%\LigerShark\SideWaffle\");
            var filePath = Path.Combine(rootDir, "SideWaffle-Settings.json");
            bool telemetry = SettingsStore.ReadJsonFile(filePath).SendTelemetry;

            if (telemetry)
            {
                var category = templateType;
                if (string.Compare("Project", templateType, StringComparison.OrdinalIgnoreCase) == 0)
                {
                    category = "project-template";
                }
                else if (string.Compare("Item", templateType, StringComparison.OrdinalIgnoreCase) == 0)
                {
                    category = "item-template";
                }

                var result = GetHashString(Environment.UserDomainName + Environment.MachineName);

                GoogleAnalyticsApi tracker = new GoogleAnalyticsApi("UA-62483606-4", result);
                tracker.TrackEvent(category, "add", templateName);
            }
        }
        private void TrackTemplate(string templateID, string templateName)
        {
            var result = GetHashString(Environment.UserDomainName + Environment.MachineName);

            GoogleAnalyticsApi tracker = new GoogleAnalyticsApi("UA-62483606-4", result);
            tracker.TrackEvent("template", "add", templateName);
        }