Firebase Cloud Firestore

Two Minute Reports' Firebase Cloud Firestore connector lets you access and analyze your data directly in Google Sheets or Looker Studio. Build custom reports, monitor key metrics, and make data-driven decisions - all without writing any code.
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 create a connection
- Go to https://hub.twominutereports.com/connections
- Click New Connection to create a connection
- Select Firebase Cloud Firestore from the list of available connectors

- Name the connection and authorize with your account credentials

After creating a connection:
- Enable the accounts you want to use from the available options

Important: Only enabled accounts can fetch data and count toward your plan usage. You can enable or disable accounts at any time in the hub to manage your plan usage efficiently.
How to get Firebase Cloud Firestore data into your reports
To pull Firebase Cloud Firestore data into Google Sheets:
- In the TMR sidebar, go to Data Queries and click Add
- Select the accounts you want to analyze (can select multiple)
- Choose your metrics and dimensions from available options
- Select the date range for your analysis
- Configure sorting and filtering options as needed
- Click Run Query to populate the data into Google Sheets


To pull Firebase Cloud Firestore data into Looker Studio:
- Click Open in Looker Studio, then click + Create Report.

- A query config panel will appear. Do one of the following:

Creating a new query config: Enter a name, select the accounts you want to include from the dropdown, then click Save.

- Choose Create report from scratch to build a custom report, or select one of the pre-built templates to get started quickly.

- In the Looker Studio connector panel, select your team and choose the required query config from the dropdown. Click Connect in the top-right corner.

- You'll land on the Looker Studio dashboard. Drag and drop the available Firebase Cloud Firestore metrics and dimensions onto your canvas to start analyzing your data.

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 — TMR substitutes them with the date range selected in the report at query time.
This is especially useful with large Firestore collections: by filtering at query time, the connector fetches only the rows you need rather than loading the entire collection and letting Looker Studio filter after the fact. This speeds up reports 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