Setup guide · Firebase

Firebase Analytics and Crashlytics in Dataki, through BigQuery

Firebase exports Analytics, Crashlytics, Performance Monitoring and Cloud Messaging to BigQuery from one screen in your project settings, and it works on the free Spark plan. Dataki connects to those datasets and answers questions about active users, releases and crashes.

  1. Firebase
  2. BigQuery export
  3. Dataki
Setup
About 5 minutes. Analytics arrives within 24 hours; the first Crashlytics and Performance export can take up to 48.
Cost
Linking is free and works on the Spark plan, inside the BigQuery sandbox. Blaze adds full BigQuery and Crashlytics streaming.
History
From the day you link. Earlier data is not available for export.
You need
Owner or Firebase Admin on the project. Turning on Analytics export also needs Editor on the linked GA property.

01Before you start

  • A Firebase project where you are Owner or Firebase Admin.
  • For Analytics: Google Analytics enabled in the project, and Editor on its property.

02Set it up

4 steps, about 5 minutes

  1. 01

    Open the BigQuery integration

    In the Firebase console, open Project settingsIntegrations, find the BigQuery card and choose Link.

  2. 02

    Choose the products to export

    Turn on the ones you will ask about. Each writes its own dataset in the project:

    • Google Analytics

      Dataset

      analytics_<property_id>

      Tables

      events_YYYYMMDD, one per day, as in the GA4 guide.

    • Crashlytics

      Dataset

      firebase_crashlytics

      Tables

      One per app: its ID with dots turned into underscores, plus _ANDROID or _IOS, e.g. com_example_app_ANDROID. Streaming adds a _REALTIME twin.

    • Performance Monitoring

      Dataset

      firebase_performance

      Tables

      One per app, Apple and Android only.

    • Cloud Messaging

      Dataset

      firebase_messaging

      Tables

      data, one row per message event.

    • Firebase exports app streams only. A web stream's data is exported from GA4 itself.
    • A/B Testing and Remote Config personalization have no dataset of their own. Their data rides on the Analytics events, e.g. as the user property firebase_exp_<id>.
  3. 03

    Wait for the first export

    Analytics data starts within 24 hours. The first Crashlytics and Performance export can take up to 48 hours, then runs daily; Crashlytics streaming, on Blaze, starts within about an hour.

  4. 04

    Connect the dataset in Dataki

    Open app.dataki.ai/connect and, under Linked Google Cloud Projects, choose Link New Google Project. Sign in with a Google account that can manage IAM in the project holding the data, and pick that project. Dataki creates a service account named Dataki in it with two roles, BigQuery Data Viewer and BigQuery Job User: it can read tables and run queries.

    The project's datasets then appear among your sources. Pick analytics_… or firebase_crashlytics. Each dataset is one source in Dataki, and the free plan includes one.

    Analytics and Crashlytics are two datasets, so they are two sources. Start with the one you will ask about most.

03Ask it

Your first questions

One Analytics question and two Crashlytics ones. Replace com_example_app_ANDROID with your app's table.

How many daily active users does each app version have this month?

BigQuery · analytics_123456789
SELECT
  PARSE_DATE('%Y%m%d', event_date) AS day,
  app_info.version,
  COUNT(DISTINCT user_pseudo_id) AS active_users
FROM `your-project.analytics_123456789.events_*`
WHERE _TABLE_SUFFIX >= FORMAT_DATE('%Y%m%d', DATE_SUB(CURRENT_DATE(), INTERVAL 30 DAY))
GROUP BY day, app_info.version
ORDER BY day

Which crashes hit the most devices this week?

The console's issue title is not exported. blame_frame names the file and symbol Crashlytics blames, which is usually enough to recognise an issue.

BigQuery · firebase_crashlytics
SELECT
  issue_id,
  ANY_VALUE(blame_frame.file) AS file,
  ANY_VALUE(blame_frame.symbol) AS symbol,
  COUNT(*) AS crashes,
  COUNT(DISTINCT installation_uuid) AS devices
FROM `your-project.firebase_crashlytics.com_example_app_ANDROID`
WHERE error_type = 'FATAL'
  AND event_timestamp >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 7 DAY)
GROUP BY issue_id
ORDER BY devices DESC
LIMIT 10

Which release crashes the most?

BigQuery · firebase_crashlytics
SELECT
  application.display_version AS version,
  COUNTIF(error_type = 'FATAL') AS crashes,
  COUNT(DISTINCT installation_uuid) AS devices_affected
FROM `your-project.firebase_crashlytics.com_example_app_ANDROID`
WHERE event_timestamp >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 30 DAY)
GROUP BY version
ORDER BY crashes DESC

04Worth knowing

What you will run into

is_fatal is on its way out
Crashlytics has deprecated the is_fatal column in favour of error_type, which is FATAL, NON_FATAL or ANR. Ask for crashes by type and Dataki will use the column that stays.
The BigQuery sandbox is for trying, not keeping
A project without billing runs in the BigQuery sandbox. Tables there expire after 60 days, storage is capped at 10 GiB for the life of the project, and streaming exports are not available. Add billing before you depend on the history.
Queries are billed to your project
Dataki runs each query in the project that holds the data, and Google bills that project for it. The first 1 TiB of queries each month is free. A question that names a period lets the query read only those days, which is what keeps it small.
Your organization may block the key Dataki needs
Linking a project creates a key for the Dataki service account. Google Cloud organizations created on or after 3 May 2024 block key creation by default, through the iam.disableServiceAccountKeyCreation policy. If linking fails there, an organization admin can lift that policy for this one project. Projects outside an organization are not affected.

Free while we are in beta

Connect Firebase. Ask it something.

Once the data is where Dataki can read it, the first answer is a question away, and anything worth keeping becomes a dashboard with a link that stays live.

One data source
Free tier. Connect a second on any paid plan.
Read-only
Every query runs read-only. Dataki cannot change your data.
No card
There is nothing to cancel if you stop.