/// <summary>
    /// Initializes the control properties.
    /// </summary>
    protected void SetupControl()
    {
        if (!StopProcessing && AnalyticsHelper.IsLoggingEnabled(SiteContext.CurrentSiteName, DocumentContext.CurrentAliasPath) && Service.Resolve <IAnalyticsConsentProvider>().HasConsentForLogging())
        {
            // If already in session or livesite .. do not register info calling
            if ((SessionHelper.GetValue("BrowserCapatibilities") == null) && ViewMode.IsLiveSite())
            {
                Guid   checkGuid  = Guid.NewGuid();
                String parameters = $"{LogResolution.ToString().ToLowerInvariant()},{LogColorDepth.ToString().ToLowerInvariant()},{LogOperatingSystem.ToString().ToLowerInvariant()},{LogSilverlight.ToString().ToLowerInvariant()},{LogJava.ToString().ToLowerInvariant()},{LogFlash.ToString().ToLowerInvariant()},'{ResolveUrl("~/CMSModules/WebAnalytics/Pages/Content/AnalyticsLog.aspx")}','{checkGuid.ToString()}'";

                ScriptHelper.RegisterStartupScript(this, typeof(string), "BrowserCapatibilitiesInit", ScriptHelper.GetScript("collectBrowserData(" + parameters + ")"));
                ScriptHelper.RegisterScriptFile(Page, "~/CMSScripts/BrowserCapabilities.js");

                SessionHelper.SetValue("BrowserCapatibilities", checkGuid.ToString());
            }
        }
    }
    /// <summary>
    /// Initializes the control properties.
    /// </summary>
    protected void SetupControl()
    {
        if (!StopProcessing && AnalyticsHelper.IsLoggingEnabled(CMSContext.CurrentSiteName, CMSContext.CurrentAliasPath))
        {
            // If already in session or livesite .. do not register info calling
            if ((SessionHelper.GetValue("BrowserCapatibilities") == null) && (ViewMode == ViewModeEnum.LiveSite))
            {
                Guid   checkGuid  = Guid.NewGuid();
                String parameters = String.Format("{0},{1},{2},{3},{4},{5},'{6}','{7}'", LogResolution.ToString().ToLower(), LogColorDepth.ToString().ToLower(),
                                                  LogOperatingSystem.ToString().ToLower(), LogSilverlight.ToString().ToLower(), LogJava.ToString().ToLower(), LogFlash.ToString().ToLower()
                                                  , ResolveUrl("~/CMSModules/WebAnalytics/Pages/Content/AnalyticsLog.aspx"), checkGuid.ToString());

                ScriptHelper.RegisterStartupScript(this, typeof(string), "BrowserCapatibilitiesInit", ScriptHelper.GetScript("collectBrowserData(" + parameters + ")"));
                ScriptHelper.RegisterScriptFile(Page, "~/CMSScripts/BrowserCapabilities.js");

                SessionHelper.SetValue("BrowserCapatibilities", checkGuid.ToString());
            }
        }
    }