google-analytics-api

How to get Daily wise data by passing single Start and End Date


Thakur Vishal Apr 27, 2012 7:18 AM
Posted in group: Google Analytics Reporting API
Hi Team,

When we pass Start Date as "2011-09-01" and End -Date as  "2011-09-30" we get the sum of all the data between this time range.
Is there a way to get the data daily wise by passing some  parameter i.e., if we pass
Start Date as "2011-09-01" and End -Date as  "2011-09-30" can we get the data for 2011-09-01,2011-09-02,.....separately but not as a sum.

I am using the following query
 
Get apiQuery = analytics.data().ga().get(
    TABLE_ID
,                       // "ga:" + Profile Id.
   
"2011-09-01",                   // Start date.
   
"2011-09-30",                   // End date.
   
"ga:visits,ga:pageviews");      // Metrics.

apiQuery
.setDimensions("ga:source,ga:medium");
apiQuery
.setFilters("ga:medium==referral");
apiQuery
.setSort("-ga:visits");
apiQuery
.setSegment("gaid::-11");
apiQuery
.setMaxResults(50);

Thanks and regards
T.Vishal