Ga api not returning all rows

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

as a experiment

i did a test by testing different metrics and dimensions

in all queryies the rows are missing

if there are 70 rows in analytics control panel then the api return 55

if there are 40 rows in analytics control panel then the api return 30

i am not applying any filter but still the rows are missing.

why

vineet

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.