private static void GetVisitFrequencyTwoPeriods()
        {
            var visitFrequency = new VisitFrequency();
            visitFrequency.setTokenAuth("XYZ");

            var results = visitFrequency.get(
                1,
                PiwikPeriod.MONTH,
                RelativeRangeDate.LAST(2)
            );

            Console.WriteLine(results.Count + " results found");

            // The request if for multiple periods
            // Loop over the requested periods
            foreach (String period in results.Keys)
            {
                Console.WriteLine("Data for " + period);

                var result = (Hashtable)results[period];

                // Display visit frequency metrics for the current period
                Console.WriteLine(
                    result[VisitFrequency.NB_VISITS_RETURNING] + " " +
                    result[VisitFrequency.NB_ACTIONS_RETURNING] + " " +
                    result[VisitFrequency.MAX_ACTIONS_RETURNING] + " " +
                    result[VisitFrequency.SUM_VISIT_LENGTH_RETURNING] + " " +
                    result[VisitFrequency.BOUNCE_COUNT_RETURNING] + " " +
                    result[VisitFrequency.BOUNCE_RATE_RETURNING] + " " +
                    result[VisitFrequency.NB_ACTIONS_PER_VISIT_RETURNING] + " " +
                    result[VisitFrequency.AVG_TIME_ON_SITE_RETURNING]
                );
            }
        }
        private static void GetVisitFrequencyOnePeriod()
        {
            var visitFrequency = new VisitFrequency();
            visitFrequency.setTokenAuth("XYZ");

            var result = visitFrequency.get(
                1,
                PiwikPeriod.RANGE,
                new AbsoluteRangeDate(new DateTime(2011, 09, 10), (new DateTime(2011, 09, 18)))
            );

            // Display visit frequency metrics for the requested period
            Console.WriteLine(
                result[VisitFrequency.NB_UNIQ_VISITORS_RETURNING] + " " +
                result[VisitFrequency.NB_VISITS_RETURNING] + " " +
                result[VisitFrequency.NB_ACTIONS_RETURNING] + " " +
                result[VisitFrequency.MAX_ACTIONS_RETURNING] + " " +
                result[VisitFrequency.SUM_VISIT_LENGTH_RETURNING] + " " +
                result[VisitFrequency.BOUNCE_COUNT_RETURNING] + " " +
                result[VisitFrequency.NB_VISITS_CONVERTED_RETURNING] + " " +
                result[VisitFrequency.BOUNCE_RATE_RETURNING] + " " +
                result[VisitFrequency.NB_ACTIONS_PER_VISIT_RETURNING] + " " +
                result[VisitFrequency.AVG_TIME_ON_SITE_RETURNING]
            );
        }