Two Minute Reports Logo
Connectors

Firebase Cloud Firestore

Connect Firebase Cloud Firestore to Google Sheets or Google Data Studio

The Firebase Cloud Firestore connector gets your Firestore data into Google Sheets and Google Data Studio. Use it to track your key metrics in a spreadsheet or a Google Data Studio report.

What you can report on

  • Custom Firestore collection data
  • App event counts and user activity
  • Document-level metrics and fields
  • In-app purchase and subscription data
  • Custom business metrics stored in Firestore

Prerequisites

  • A Firebase project with Cloud Firestore enabled
  • A service account with the Cloud Datastore User role
  • The service account JSON key file downloaded from Firebase Console

How to get your credentials

Two Minute Reports reads Firestore with the service account key, through Google Cloud IAM. Firestore Security Rules do not apply to this access, so you do not need to change your rules. Do not set allow read: if true: that rule lets anyone on the internet read your database.

Generate a service account key

  1. In the Firebase Console, go to Project Settings (gear icon).
  2. Select the Service Accounts tab.

  1. Select Generate New Private Key.

  1. Your browser downloads a .json file. Keep this file secure. You paste its contents into Two Minute Reports.


How to create a connection

  1. In the Hub, open Connections & accounts.
  2. Select Create connection.
  3. Select Firebase - Cloud Firestore in the connector list.
  4. Select Next.

  1. In Name the connection, enter a name.
  2. In Service account credentials (JSON), paste the full contents of your service account .json key file. If you don't have the file yet, see How to get your credentials.
  3. Select Test connection.

  1. Enable the database you want to report on.
  2. Select Done.

Only enabled accounts fetch data, and only enabled accounts count toward your plan. You can enable or disable accounts at any time on the Connections & accounts page.

How to get Firebase Cloud Firestore data into Google Sheets or Google Data Studio

To get Firebase Cloud Firestore data into Google Sheets:

  1. In the Two Minute Reports sidebar, open Data Queries.
  2. Select Add.
  3. Select the database you want to report on. A query uses one database.
  4. Under Query Type, select Structured Query or FireSQL. Then enter your Query.
  5. Select Run query. Two Minute Reports adds the data to your sheet.

Dynamic dates

When your query config uses fixed date filters in a Structured query or FireSQL query, you have to update them manually. Instead, use the @startDate and @endDate parameters. When the query runs, Two Minute Reports replaces them with the report's date range.

This is especially useful with large Firestore collections. The connector fetches only the rows you need, and does not load the entire collection for Google Data Studio to filter later. This makes reports faster and reduces Firestore read costs.

Structured query, static dates:

collection: orders
filters: [{ field: "order_date", op: ">=", value: "2024-01-01" }, { field: "order_date", op: "<=", value: "2024-01-31" }]

Same query with dynamic dates:

collection: orders
filters: [{ field: "order_date", op: ">=", value: "@startDate" }, { field: "order_date", op: "<=", value: "@endDate" }]

FireSQL query, static dates:

SELECT * FROM orders WHERE order_date >= '2024-01-01' AND order_date <= '2024-01-31'

Same query with dynamic dates:

SELECT * FROM orders WHERE order_date >= @startDate AND order_date <= @endDate
Copyright © 2026