Hi all
i am using this ga api class to extract data from google analytics
but its not showing all rows.
i have set max_results=50
i have more than 10 results.
its not returning above 10 rows
$start_date='2016-08-06';
$end_date='2016-09-05';
try {
$ga->requestReportData(xxxxxxxx,
array('browser'),
array('pageviews'),
$sort_metric=null, $filter=null,
$start_date,$end_date,
$start_index=1, $max_results=50);
} catch (Exception $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
}
?>
<table width='60%'>
<tr style="background-color:#00ff00;">
<th>Browser</th>
<th>Page Views</th>
</tr>
<?php
foreach($ga->getResults() as $result):
?>
<tr style="background-color:<?php echo $color ?>">
<td><?php echo $result ?></td>
<td><?php echo $result->getPageviews() ?></td>
</tr>
<?php
endforeach
?>
</table>
what can be the problem ??
why is it not returning all rows ??
vineet