/// <summary>
        /// Displays information about the current page
        /// </summary>
        private void ListPageInformation()
        {
            List <string> info = new List <string>();

            info.Add(string.Format("Page Id: {0}", Tracker.CurrentPage.PageId));
            info.Add(string.Format("Page Views: {0}", PageStatistics.GetPageViewCount(Sitecore.Context.Item).ToString("N0")));

            rptPageInfo.DataSource = info;
            rptPageInfo.DataBind();
        }
        /// <summary>
        /// Displays information about the current visitor
        /// </summary>
        private void ListVisitorInformation()
        {
            List <string> info = new List <string>();

            //visitor
            Visitor visitor = PageStatistics.GetCurrentVisitor();

            if (visitor != null)
            {
                info.Add(string.Format("Visitor Id: {0}", visitor.VisitorId));
                info.Add("Visitor's Engagement Value: <span class=\"visitEV\"></span>");
            }

            rptVisitorInfo.DataSource = info;
            rptVisitorInfo.DataBind();
        }
        /// <summary>
        /// Displays the Achieved Goals datatable
        /// </summary>
        private void LoadAchievedGoals()
        {
            if (TestComponentItem.IsNull() || TestDefinitionItem.IsNull() || GoalItem.IsNull())
            {
                return;
            }

            DateTime startTime = DateTime.MinValue;

            if (beginDatePicker.SelectedDate.HasValue)
            {
                startTime = beginDatePicker.SelectedDate.Value;
            }

            DateTime endTime = DateTime.MaxValue;

            if (endDatePicker.SelectedDate.HasValue)
            {
                endTime = endDatePicker.SelectedDate.Value;
            }

            List <VisitVariation> achievedGoals = PageStatistics.GetAchievedGoals(GoalItem, TestDefinitionItem, startTime,
                                                                                  endTime);

            if (achievedGoals == null || achievedGoals.Count == 0)
            {
                ShowErrors(new List <string> {
                    "No data available for the selected parameters"
                });
                return;
            }

            litAchievedGoal.Text        = TestComponentItem.Name;
            rptAchievedGoals.DataSource = achievedGoals;
            rptAchievedGoals.DataBind();
            plcAchievedGoalData.Visible = true;
            plcReport.Visible           = true;

            //set totals which are summed up during the databinding process
            litTotalVisitCount.Text    = TotalVisitCount.ToString("N0");
            litTotalAchievedCount.Text = TotalAchievedGoalCount.ToString("N0");
        }