title: want to show google analytics reports->overview in my admin panel
body: <p>To show google analytics reports->overview in my admin panel, I use 
  [<a href="https://stackoverflow.com/questions/15330121/best-api-to-display-google-analytics-data-in-my-admin-panel-with-codeigniter-php][1]">Best API to display Google Analytics data in my Admin panel with Codeigniter PHP?</a>         </p>
  
  <p>and download from [<a href="https://github.com/erebusnz/gapi-google-analytics-php-interface][2]" rel="nofollow noreferrer">https://github.com/erebusnz/gapi-google-analytics-php-interface][2]</a>     </p>
  
  <p>I follow all the steps</p>
  
  <p>Create a Google Developers project<br>
  Create service account for this project, see instructions
  Download the .p12 file for this service account, upload to the same folder as gapi.class.php
  Enable 'analytics API' on the Google Developers console
  In Google Analytics Administration > User Management, give the service account 'Read and Analyse' permissions on the analytics accounts you want to access</p>
  
  <p>and make one file named index.php which code as follow    </p>
  
  <pre><code>&lt;?php     
      require 'example.account.php';
      foreach($ga-&gt;getResults() as $result)
      {
        echo $result-&gt;getUniquePageviews();
        echo $result-&gt;getPagePath();
      }?&gt; 
  </code></pre>
  
  <p>I made change in gapi.class.php</p>
  
  <pre><code> const account_data_url = 
     'https://analytics.google.com/analytics/web/#embed/report-
               home/a110062270w164329621p165035928/';
   const report_data_url = 
    'https://analytics.google.com/analytics/web/#realtime/rt-
             overview/a110062270w164329621p165035928/';     
  </code></pre>
  
  <p>and in example.account.php     </p>
  
  <pre><code> $ga = new gapi("eva-277@eva-ceramic.iam.gserviceaccount.com", "key.p12");         
  </code></pre>
  
  <p>but after then it shows error          </p>
  
  <blockquote>
    <p>Fatal error: Uncaught exception 'Exception' with the message 'GAPI:
    Failed to authenticate user. Error: "{ "error": "invalid_grant",
    "error_description": "Invalid JWT: Token must be a short-lived token
    (60 minutes) and in a reasonable timeframe. Check your iat and exp
    values and use a clock with the skew to account for clock differences
    between systems." } "' in file path....</p>
  </blockquote>
  
  <p>I try above matter in localhost but in google analytics account show information correctly.</p>