title: Google Analytics API - Average Session time doesn't fit with Analytics Dashboard
body: <p>I am using the Google Analytics API and want to know the average session duration of a spezific content site.</p>
  
  <p>To get the metrics I am using this PHP Code:</p>
  
  <pre><code>$result = $analytics-&gt;data_ga-&gt;get(
              'ga:XXXXXXX',
              '2012-01-01',
              date("Y-m-d"),
              'ga:visits',
              array(
                  'filters' =&gt; 'ga:pagePath==MY_URL',
                  'dimensions' =&gt; 'ga:pagePath',
                  'metrics' =&gt; 'ga:pageviews,ga:sessions,ga:uniquePageviews,ga:avgSessionDuration,ga:bounces',
                  'sort' =&gt; '-ga:uniquePageviews',
                  'max-results' =&gt; '25'
              )
          );
  </code></pre>
  
  <p>I get the following result:</p>
  
  <pre><code>[0] =&gt; Array
                  (
                      [0] =&gt; MY_URL
                      [1] =&gt; 8966
                      [2] =&gt; 7434
                      [3] =&gt; 7434
                      [4] =&gt; 17.15496368038741
                      [5] =&gt; 6245
                  )
  </code></pre>
  
  <p>Numbers 0-3 and 5 are exactly the same like Google Analytics Dashboard numbers (when I am logged in with my browser in google analytics)</p>
  
  <p>But <strong>average duration time on site</strong> doesn't fit. API shows me 17.15 seconds and Google Analytics dashboard shows me 1 minute and 23 seconds.</p>
  
  <p>Are these the same metrics? I want to have the "average duration time on site" (like standard Analytics Dashboard shows me).</p>
  
  <p>Thanks!</p>