title: Counting app screen-views using Google Analytics BigQuery export
body: <p>I'm trying to count the number of app screen-views for a particular screen using the Google Analytics BigQuery data export. My approach would be to count the number of hits with a screen-view <code>hits.type</code>. For instance, to count the number of page-views on the web version of our app I would count the number of hits with <code>hits.type = 'PAGE'</code>. but I can't see how to do this on app because there is no "SCREENVIEW" <code>hits.type</code> value. </p>
  
  <p>This is the description of <code>hits.type</code> from Google (<a href="https://support.google.com/analytics/answer/3437719?hl=en" rel="nofollow noreferrer">https://support.google.com/analytics/answer/3437719?hl=en</a>):</p>
  
  <blockquote>
    <p>The type of hit. One of: "PAGE", "TRANSACTION", "ITEM", "EVENT",
    "SOCIAL", "APPVIEW", "EXCEPTION".</p>
  </blockquote>
  
  <p>Is there another way to do this that I'm missing?</p>
  
  <p>I've tried using the <code>totals.screenviews</code> metric:</p>
  
  <pre><code>SELECT
    hits.appInfo.screenName,
    SUM(totals.screenviews) AS screenViews
  FROM (TABLE_DATE_RANGE([tableid.ga_sessions_], TIMESTAMP('2018-01-12'), TIMESTAMP('2018-01-12') ))
  GROUP BY
    hits.appInfo.screenName
  </code></pre>
  
  <p>But that returns numbers that are too high.</p>