Beispiel #1
0
        /// <summary>
        ///  Reports upgrades, launches, etc., and allows for later calls to notify analytics of navigation and events
        /// </summary>
        private void BeginGoogleAnalytics(string domain, string googleAnalyticsAccountCode, bool reportAsDeveloper)
        {
            var osLabel = ErrorReport.GetOperatingSystemLabel();

            _analytics = new AnalyticsEventSender(domain, googleAnalyticsAccountCode, UserGuid, _settings.FirstLaunchDate, _settings.PreviousLaunchDate, _settings.Launches, reportAsDeveloper, SaveCookie, null /*COOKIE TODO*/);

            if (DateTime.UtcNow.Date != _settings.PreviousLaunchDate.Date)
            {
                SendNavigationNotice("{0}/launch/version{1}", osLabel, ErrorReport.VersionNumberString);
            }

            //TODO: maybe report number of launches... depends on whether GA gives us the same data somehow
            //(i.e., how many people are return vistors, etc.)

            if (string.IsNullOrEmpty(_realPreviousVersion))
            {
                SendNavigationNotice("{0}/firstApparentLaunchForAnyVersionOnMachine" + "/" + ErrorReport.VersionNumberString, osLabel);
            }
            else if (_realPreviousVersion != ErrorReport.VersionNumberString)
            {
                SendNavigationNotice("{0}/versionChange/version{1}-previousVersion{2}", osLabel, ErrorReport.VersionNumberString, _realPreviousVersion);
            }
        }
Beispiel #2
0
		/// <summary>
		///  Reports upgrades, launches, etc., and allows for later calls to notify analytics of navigation and events
		/// </summary>
		private void BeginGoogleAnalytics(string domain, string googleAnalyticsAccountCode, bool reportAsDeveloper)
		{
				var osLabel = ErrorReport.GetOperatingSystemLabel();

				_analytics = new AnalyticsEventSender(domain, googleAnalyticsAccountCode, UserGuid, _settings.FirstLaunchDate, _settings.PreviousLaunchDate, _settings.Launches, reportAsDeveloper, SaveCookie, null/*COOKIE TODO*/);

				if (DateTime.UtcNow.Date != _settings.PreviousLaunchDate.Date)
				{
					SendNavigationNotice("{0}/launch/version{1}", osLabel, ErrorReport.VersionNumberString);
				}

				//TODO: maybe report number of launches... depends on whether GA gives us the same data somehow
				//(i.e., how many people are return vistors, etc.)

				if (string.IsNullOrEmpty(_realPreviousVersion))
				{
					SendNavigationNotice("{0}/firstApparentLaunchForAnyVersionOnMachine" + "/" + ErrorReport.VersionNumberString, osLabel);
				}
				else if (_realPreviousVersion != ErrorReport.VersionNumberString)
				{
					SendNavigationNotice("{0}/versionChange/version{1}-previousVersion{2}", osLabel, ErrorReport.VersionNumberString, _realPreviousVersion);
				}
		}