I used gapi.class.php version 3 to take number of visitors, But I get only total number. I want to get analytics data group by date.
Here are access url to google
https://www.googleapis.com/analytics/v3/data/ga?ids=ga:xxxxx&dimensions=ga:browser,ga:browserVersion,ga:month&metrics=ga:pageviews,ga:visits,ga:sessions&sort=ga:pageviews,ga:visits,ga:sessions&start-date=2016-10-01&end-date=2017-01-13&start-index=1&max-results=10000
Here are php code
$fromDate = '2016-10-01';
$toDate = '2017-01-30';
$ga->requestReportData(xxxxxx,array('browser','browserVersion','month'),array('pageviews','visits','sessions'), $sort_metric=null, $filter=null, $start_date=$fromDate, $end_date=$toDate, $start_index=1, $max_results=10000);
$visits = array('visits'=>$ga->getVisits());
echo json_encode($visits);
Json return is
{"visits":1399313}
Please, how do I get its data by month
Thanks
After couple of hours I found solution. I remove browser and browserVersion it is need only month and year. Jason return by group of date and year Thank you all