Firebase Analytics Import¶
QualCoder can import Firebase Analytics data exported from BigQuery, creating cases with behavioral attributes for each user.
Supported Formats¶
| Format | Extension | Description |
|---|---|---|
| BigQuery NDJSON | .json / .ndjson |
Raw event export from Firebase via BigQuery (newline-delimited JSON) |
| Pre-aggregated CSV | .csv |
CSV with one row per user and columns for metrics |
Importing Firebase NDJSON¶
Use this when you have a raw Firebase Analytics export from BigQuery.
- Click Import > Survey CSV (.csv)... or use the
import_firebaseMCP tool - Select the
.jsonor.ndjsonfile - QualCoder parses each event line, aggregates by user, and creates one Case per user
What Gets Created¶
Each user becomes a Case with these attributes:
| Attribute | Type | Description |
|---|---|---|
event_count |
Number | Total events for the user |
session_count |
Number | Distinct session count |
first_event |
Text | Earliest event name |
last_event |
Text | Latest event name |
top_event |
Text | Most frequent event name |
<event_name>_count |
Number | Count per distinct event type (e.g., screen_view_count) |
Merge Behavior¶
If a case with the same user ID already exists, QualCoder merges the new attributes into the existing case rather than creating a duplicate. This allows incremental imports from multiple export batches.
Importing Pre-Aggregated CSV¶
If you have already aggregated your Firebase data (e.g., using the provided scripts/aggregate_firebase.sql), import it as a CSV:
- Click Import > Survey CSV (.csv)...
- Select the
.csvfile - The first column is used as the case name (user ID) by default
Column types are automatically inferred: - Columns with all numeric values become Number attributes - Date-like columns become Date attributes - Everything else becomes Text
Use the name_column parameter (via MCP) to specify which column contains the user ID if it is not the first column.
MCP Tools¶
import_firebase¶
Import a Firebase BigQuery NDJSON export directly.
| Parameter | Type | Required | Description |
|---|---|---|---|
source_path |
string | Yes | Path to the NDJSON file |
import_data with format: "firebase_csv"¶
Import a pre-aggregated Firebase CSV via the general import tool.
| Parameter | Type | Required | Description |
|---|---|---|---|
format |
string | Yes | firebase_csv |
source_path |
string | Yes | Path to the CSV file |
name_column |
string | No | Column to use as case name |
import_data with format: "firebase_json"¶
Import raw Firebase NDJSON via the general import tool (delegates to import_firebase).
| Parameter | Type | Required | Description |
|---|---|---|---|
format |
string | Yes | firebase_json |
source_path |
string | Yes | Path to the NDJSON file |
Preparation Scripts¶
QualCoder includes helper scripts for preparing Firebase data:
scripts/aggregate_firebase.sql— BigQuery SQL to aggregate raw events into per-user rowsscripts/aggregate_firebase.py— Python script to aggregate NDJSON locally
Error Handling¶
| Error | Cause | Fix |
|---|---|---|
FIREBASE_NOT_IMPORTED/FILE_NOT_FOUND |
File path does not exist | Check the path and try again |
FIREBASE_NOT_IMPORTED/NO_PROFILES |
No valid user profiles found in the file | Ensure the file contains Firebase event JSON with user_pseudo_id fields |
CSV_NOT_IMPORTED/FILE_NOT_FOUND |
CSV file not found | Check the file path |