Skip to content

Instantly share code, notes, and snippets.

@jhnvdw
Last active March 20, 2023 12:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save jhnvdw/2dcf3451fcbca0cbccac6b71816e639c to your computer and use it in GitHub Desktop.
Save jhnvdw/2dcf3451fcbca0cbccac6b71816e639c to your computer and use it in GitHub Desktop.
SELECT
-- app_info.id (dimension | the package name or bundle ID of the app)
app_info.id,
-- app_info.version (dimension | the app's versionName (Android) or short bundle version)
app_info.version,
-- app_info.install_store (dimension | the store that installed the app)
app_info.install_store,
-- app_info.firebase_app_id (dimension | the Firebase App ID associated with the app)
app_info.firebase_app_id,
-- app_info.install_source (dimension | the source that installed the app)
app_info.install_source
FROM
-- Change this to your Google Analytics 4 export location in BigQuery
`ga4.analytics_1234567890.events_*`
WHERE
-- Define static and/or dynamic start and end date
_table_suffix BETWEEN '20200220'
AND FORMAT_DATE('%Y%m%d',DATE_SUB(CURRENT_DATE(), INTERVAL 1 DAY))
GROUP BY
1,
2,
3,
4,
5
LIMIT
10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment