title: Google Analytics API - How to calculate average page depth
body: <p>I'm trying to determine how to calculate the <strong>average</strong> page depth for all sessions, daily, for a range of dates. I know that GA has a dimension named ga:pageDepth, but this is not the average page depth. This just returns the number of sessions that had a page depth of 1, and 2, and 3 etc. What I would like is something returned like this:</p>
  
  <pre><code>December 1, 2015: 10
  December 2, 2015: 9
  </code></pre>
  
  <p>Where 10 and 9 represent the average page depth for all sessions.</p>
  
  <p>I've been using the Google Analytics API (<a href="https://ga-dev-tools.appspot.com/query-explorer/#report-end" rel="nofollow">Query Explorer</a>) but cannot find a way to do it.</p>