예제 #1
0
        public GoogleAnalyticsClient(string trackingId, string appName, GoogleAnalyticsStatisticsProvider provider)
        {
            m_trackingId = trackingId;
            m_appName    = appName;
            m_provider   = provider;
            m_appVersion = Assembly.GetCallingAssembly().GetName().Version !.ToString();
            m_clientId   = LoadOrCreateClientId();
            m_httpClient = new HttpClient();

            m_httpClient.DefaultRequestHeaders.Add("User-Agent", m_provider.SystemUserAgent);
            m_httpClient.Timeout = TimeSpan.FromSeconds(3);
        }
예제 #2
0
		public GoogleAnalyticsClient(string trackingId, string appName, GoogleAnalyticsStatisticsProvider provider)
		{
			m_trackingId = trackingId;
			m_appName = appName;
			m_provider = provider;
			m_appVersion = Assembly.GetCallingAssembly().GetName().Version.ToString();
			m_clientId = LoadOrCreateClientId();
			m_httpClient = new HttpClient();

			m_httpClient.DefaultRequestHeaders.Add("User-Agent", m_provider.SystemUserAgent);
			m_httpClient.Timeout = TimeSpan.FromSeconds(3);
		}