CSharpAnalytics.Protocols.Urchin.UrchinConfiguration.UrchinConfiguration C# (CSharp) Method

UrchinConfiguration() public method

Create a new cofiguration for analytics.
public UrchinConfiguration ( string accountId, string hostName, System.TimeSpan sessionTimeout = null ) : System
accountId string Google Analytics provided property id in the format UA-XXXX-Y.
hostName string Host name of the site or name of the application.
sessionTimeout System.TimeSpan Optional inactivity before existing session expires. Defaults to 20 minutes.
return System
        public UrchinConfiguration(string accountId, string hostName, TimeSpan? sessionTimeout = null)
        {
            if (!accountIdMatch.IsMatch(accountId))
                throw new ArgumentException("accountID must be in the format UA-XXXX-Y.");

            this.accountId = accountId;
            this.hostName = hostName;
            this.sessionTimeout = sessionTimeout ?? TimeSpan.FromMinutes(20);
            AnonymizeIp = true;
        }