title: How to get Total Results using Google Analytics Embed API
body: <p>I'm trying to simply pull the total number of pages on my site.</p>
  
  <p>Using the GA Query Explorer (<a href="https://ga-dev-tools.appspot.com/query-explorer/" rel="nofollow">https://ga-dev-tools.appspot.com/query-explorer/</a>), you can see the "Total results found" number when the results are displayed after running a query.</p>
  
  <p>How can I apply this to GA Embed API query format? ...</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var pageTitles = new gapi.analytics.googleCharts.DataChart({
      reportType: 'ga',
      query: {
        'dimensions': 'ga:pageTitle',
        'metrics': 'ga:pageviews',
        'segment': 'gaid::-1',
        'sort': '-ga:pageviews',
        'filters': 'ga:pagePath!=/',
        'max-results': '10',
        'totalResults': 'integer',
      },
      chart: {
        type: 'TABLE',
        container: 'page-titles',
        options: {
          title: 'Top Pageviews',
          width: '100%'
        }
      }
    });</code></pre>
  </div>
  </div>
  </p>
  
  <p>Thank you!!</p>