google analytics refering path RRS feed

  • Question

  • User1677376887 posted

    I have implemented google analytics to get data like page views, visits,direct taffic,refferals etc using this code

    DataQuery query = new DataQuery("https://www.google.com/analytics/feeds/data");
    query.Ids = "ga:61092469";
    query.Metrics = "ga:pageviews";
    //query.Dimensions = "ga:visitorType";

    query.Sort = "ga:pageviews";
    query.GAStartDate = Convert.ToDateTime(System.Configuration.ConfigurationManager.AppSettings["stDate"].ToString()).ToString("yyyy-MM-dd");
    query.GAEndDate = Convert.ToDateTime(System.Configuration.ConfigurationManager.AppSettings["edDate"].ToString()).ToString("yyyy-MM-dd");

    DataFeed dataFeed = GAService.Query(query);
    foreach (DataEntry entry in dataFeed.Entries)
    string st = entry.Title.Text;
    string ss = entry.Metrics[0].Value;
    lblPageViews.Text = ss;

    could any one tell what should be the metrics and dimention used for refferal visits


    Wednesday, September 12, 2012 9:28 AM