title: Pagination in google analytics report
body: <p>Here I am getting the next and previous url but when trying to access the next page with the url , I am getting error as </p>
  
  <p>URL = <a href="https://www.googleapis.com/analytics/v3/data/ga?ids=ga:85914642&amp;dimensions=ga:pagePath,ga:date&amp;metrics=ga:pageviews,ga:uniquePageviews,ga:sessionDuration,ga:bounceRate,ga:exits&amp;sort=-ga:pageViews&amp;filters=ga:pageViews%3C%3D10&amp;start-date=7daysAgo&amp;end-date=today&amp;start-index=11&amp;max-results=10" rel="nofollow">https://www.googleapis.com/analytics/v3/data/ga?ids=ga:85914642&amp;dimensions=ga:pagePath,ga:date&amp;metrics=ga:pageviews,ga:uniquePageviews,ga:sessionDuration,ga:bounceRate,ga:exits&amp;sort=-ga:pageViews&amp;filters=ga:pageViews%3C%3D10&amp;start-date=7daysAgo&amp;end-date=today&amp;start-index=11&amp;max-results=10</a>  </p>
  
  <blockquote>
    <p>Error:
    {"error":{"errors":[{"domain":"global","reason":"required","message":"Login
    Required","locationType":"header","location":"Authorization"}],"code":401,"message":"Login
    Required"}}</p>
  </blockquote>
  
  <pre><code>  public  function getPaginationInfo(&amp;$results) {
          $client = new Google_Client();
          if( isset( $_SESSION['access_token'] ) ){
              $client-&gt;setAccessToken($_SESSION['access_token']);
          } 
          // Create an authorized analytics service object.
          $analytics = new Google_Service_Analytics($client);
  
          // Get the first view (profile) id for the authorized user.
          $profile = $this-&gt;getFirstProfileId($analytics);
  
          // Get the results from the Core Reporting API and print the results.
          $this-&gt;results = $this-&gt;getResults($analytics, $profile);
          var_dump( $this-&gt;results );
  
          $html = &lt;&lt;&lt;HTML
          &lt;pre&gt;
          Items per page = {$this-&gt;results-&gt;getItemsPerPage()}
          Total results  = {$this-&gt;results-&gt;getTotalResults()}
          Previous Link  = {$this-&gt;results-&gt;getPreviousLink()}
          Next Link      = {$this-&gt;results-&gt;getNextLink()}
         &lt;/pre&gt;
  HTML; 
  
             print $html;
          }
  </code></pre>
  
  <p>I also want to know current page number , is there any function for that ??</p>