Ocular reads GA4 data through the GA4 → BigQuery export. You’ll link GA4 to a BigQuery project, create a service account with read access, grant that service account access to the GA4 property, then paste the credentials into Ocular.Documentation Index
Fetch the complete documentation index at: https://docs.ocular.dev/llms.txt
Use this file to discover all available pages before exploring further.
What you need
Project ID, Service-Account JSON key, BigQuery dataset/schema name, dataset location, and a Start Date.
What it unlocks
Storefront-attributed ROAS, the User Activity Cohort (event-based retention), and the full session-to-checkout funnel.
Prerequisites: a GA4 property, a Google Cloud project with billing or sandbox enabled, BigQuery Owner on that project, and at least GA4 Editor access on the property.
Step 1 · Link GA4 to BigQuery
Skip this step if you already have GA4 exporting to BigQuery.Choose your Google Cloud project
Click Choose a BigQuery project, select your existing project, and click Confirm.
Choose export frequency
- Daily — one update per day (recommended).
- Streaming (optional) — a same-day table that fills until the day completes, then a new daily table is added.
Streaming is not available on BigQuery sandbox accounts. Enable it later if you upgrade to a billing-enabled project.
Optional — add another stream or event filter
If you have an additional data stream (app or web), add it to the same dataset via Edit. You may also see a step to filter events sent to BigQuery — useful to skip events you don’t need or stay under the 1-million-events daily limit.
events_* tables into a dataset named analytics_PROPERTY_ID inside the selected project.
Step 2 · Create a service account with BigQuery access
Open IAM & Admin → Service Accounts
In Google Cloud console, open the same project and navigate to IAM & Admin → Service Accounts.
Create the service account
Click + Create Service Account, name it (e.g.,
ocular-ga4-reader), and click Create and Continue.Grant roles
Add these three roles:
BigQuery Data Viewer
Read dataset and table data.
BigQuery Job User
Run BigQuery jobs in the project.
BigQuery Read Session User
Faster reads on large tables.
Full Google reference: Creating and managing service accounts.
Step 3 · Give the service account access to the GA4 property
Open GA4 Property Access Management
In GA4, go to Admin → Property Access Management, then click + → Add users.
Step 4 · Find your BigQuery schema and location
Schema name
Dataset location
Or run this query to get both values at once:
Step 5 · Plug the credentials into Ocular
Open the connector form
In Ocular, open Data Management → Connectors → Add connector → Google Analytics 4.
Fill the fields
Connector Name
Any name you choose.
Project ID
Your Google Cloud project ID.
Service-account JSON key
Upload or paste the JSON file contents from Step 2.
Schema name
The
analytics_* dataset name from Step 4.Start Date
Earliest date for data sync (e.g.,
2023-01-01).Location of the BigQuery
The region from Step 4.
Troubleshooting
No data in BigQuery after linking
No data in BigQuery after linking
GA4 → BigQuery takes up to 24 hours for the first export. If nothing appears after 24 hours, verify:
- The link is still active in GA4 Admin → BigQuery Linking.
firebase-measurement@system.gserviceaccount.comis a project member with the BigQuery User role.- You haven’t hit the 1-million-events daily cap on a sandbox project.
Connection succeeds but Ocular sees no rows
Connection succeeds but Ocular sees no rows
Confirm the Schema name matches the actual dataset (
analytics_<property_id>, not just analytics_) and the Location matches the dataset’s region. A region mismatch causes BigQuery to silently return zero rows.Permission denied on BigQuery
Permission denied on BigQuery
The service account must have all three roles: BigQuery Data Viewer, BigQuery Job User, BigQuery Read Session User. Re-check under IAM & Admin → IAM in Google Cloud and re-grant if any are missing.
Need to change the region after linking
Need to change the region after linking
BigQuery datasets can’t be moved across regions in place. Either move the dataset using Google Cloud’s transfer service, or unlink GA4 → BigQuery, delete the existing dataset, and re-link with the correct region.
For ticket-writing format when filing a connector issue, see Working with the Ocular team → Connector-not-working tickets.
