> ## 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.

# Google Analytics 4

> Connect Google Analytics 4 to Ocular through the GA4 BigQuery export using a Google Cloud service account for full session and event-level reporting.

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.

<CardGroup cols={2}>
  <Card title="What you need" icon="key">
    Project ID, Service-Account JSON key, BigQuery dataset/schema name, dataset location, GA4 Property ID, and Start / Events Start datesGA4 Property ID, and Start / Events Start dates.
  </Card>

  <Card title="What it unlocks" icon="chart-line">
    Storefront-attributed ROAS, the User Activity Cohort (event-based retention), and the full session-to-checkout funnel.
  </Card>
</CardGroup>

<Note>
  **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.
</Note>

<Frame caption="GA4 connector — Data Management → Connectors → Add connector → Google Analytics 4">
  <img alt="GA4 connector placeholder" lightAlt="GA4 connector placeholder" darkAlt="GA4 connector placeholder" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/gaga-1.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=36299f5f8fa4085f35b1ed5dec45ca8c" className="dark:hidden" width="2402" height="1446" data-path="images/gaga-1.png" />

  <img alt="GA4 connector placeholder" lightAlt="GA4 connector placeholder" darkAlt="GA4 connector placeholder" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/gaga-2.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=753e6ffb3775bcaefacfdc121208c632" className="hidden dark:block" width="2402" height="1446" data-path="images/gaga-2.png" />
</Frame>

***

## <Icon icon="link" /> Step 1 · Link GA4 to BigQuery

Skip this step if you already have GA4 exporting to BigQuery.

<Steps>
  <Step title="Open BigQuery Linking" icon="google" iconType="brands">
    In your GA4 property, click **Admin** → **BigQuery Linking**.
  </Step>

  <Step title="Open BigQuery LinkingOpen BigQuery Linking" icon="google" iconType="brands">
    In your GA4 property, click **Admin** → **BigQuery Linking**In your GA4 property, click **Admin** → **BigQuery Linking**.

    <Frame caption="GA4 Admin → BigQuery Linking">
      <img alt="GA41" lightAlt="GA41" darkAlt="GA41" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA41.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=d4ee593afa262d214c61b77632937b20" className="dark:hidden" width="1939" height="905" data-path="images/GA41.png" />

      <img alt="GA41" lightAlt="GA41" darkAlt="GA41" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA41-1.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=a247533eec9e6d7ed12a3aeed943839c" className="hidden dark:block" width="1939" height="905" data-path="images/GA41-1.png" />
    </Frame>

    <Frame caption="GA4 Admin → BigQuery Linking">
      <img alt="GA41" lightAlt="GA41" darkAlt="GA41" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA41.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=d4ee593afa262d214c61b77632937b20" className="dark:hidden" width="1939" height="905" data-path="images/GA41.png" />

      <img alt="GA41" lightAlt="GA41" darkAlt="GA41" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA41-1.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=a247533eec9e6d7ed12a3aeed943839c" className="hidden dark:block" width="1939" height="905" data-path="images/GA41-1.png" />
    </Frame>
  </Step>

  <Step title="Create a new linkreate a new link" icon="plus">
    Click **Link** to start a new connection**Link** to start a new connection.
  </Step>

  <Step title="Create a new linkCreate a new link" icon="plus">
    Click **Link** to start a new connectionClick **Link** to start a new connection.

    <Frame caption="Click Link to create a new connection">
      <img alt="GA42" lightAlt="GA42" darkAlt="GA42" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA42.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=ed4292aeac3cbec91395b8df0c9c14b7" className="dark:hidden" width="1902" height="894" data-path="images/GA42.png" />

      <img alt="GA42" lightAlt="GA42" darkAlt="GA42" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA42-1.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=5eaff6413afe2e78f248913c3e2aeeeb" className="hidden dark:block" width="1902" height="894" data-path="images/GA42-1.png" />
    </Frame>

    <Frame caption="Click Link to create a new connection">
      <img alt="GA42" lightAlt="GA42" darkAlt="GA42" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA42.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=ed4292aeac3cbec91395b8df0c9c14b7" className="dark:hidden" width="1902" height="894" data-path="images/GA42.png" />

      <img alt="GA42" lightAlt="GA42" darkAlt="GA42" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA42-1.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=5eaff6413afe2e78f248913c3e2aeeeb" className="hidden dark:block" width="1902" height="894" data-path="images/GA42-1.png" />
    </Frame>
  </Step>

  <Step title="Choose your Google Cloud project" icon="server">
    Click **Choose a BigQuery project**, select your existing project, and click **Confirm**.

    <Tip>
      If your project isn't listed, confirm you've created it in Google Cloud and refresh.
    </Tip>
  </Step>

  <Step title="Choose your Google Cloud project" icon="server">
    Click **Choose a BigQuery project**, select your existing project, and click **Confirm**.

    <Tip>
      If your project isn't listed, confirm you've created it in Google Cloud and refresh.
    </Tip>

    <Frame caption="Select your BigQuery (Google Cloud) project and confirm">
      <img alt="GA43" lightAlt="GA43" darkAlt="GA43" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA43.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=bccd89eebe0192fb3fc36e96465d4ac8" className="dark:hidden" width="1905" height="900" data-path="images/GA43.png" />

      <img alt="GA43" lightAlt="GA43" darkAlt="GA43" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA43-1.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=95bf977cd20688091495560a8b481241" className="hidden dark:block" width="1905" height="900" data-path="images/GA43-1.png" />
    </Frame>
  </Step>

  <Step title="Pick a data location" icon="globe">
    Select the region where you'll run your queries.

    <Warning>
      If you choose the wrong region and need to change it later, you'll have to move the dataset in Google Cloud and create a new link, or delete the link + dataset and start over.
    </Warning>
  </Step>

  <Step title="Choose export frequency" icon="clock-rotate-left">
    * **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.

    <Note>
      Streaming is **not** available on BigQuery sandbox accounts. Enable it later if you upgrade to a billing-enabled project.
    </Note>
  </Step>

  <Step title="Choose your Google Cloud project" icon="server">
    Click **Choose a BigQuery project**, select your existing project, and click **Confirm**.

    <Tip>
      If your project isn't listed, confirm you've created it in Google Cloud and refresh.
    </Tip>
  </Step>

  <Step title="Choose your Google Cloud project" icon="server">
    Click **Choose a BigQuery project**, select your existing project, and click **Confirm**.

    <Tip>
      If your project isn't listed, confirm you've created it in Google Cloud and refresh.
    </Tip>

    <Frame caption="Select your BigQuery (Google Cloud) project and confirm">
      <img alt="GA43" lightAlt="GA43" darkAlt="GA43" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA43.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=bccd89eebe0192fb3fc36e96465d4ac8" className="dark:hidden" width="1905" height="900" data-path="images/GA43.png" />

      <img alt="GA43" lightAlt="GA43" darkAlt="GA43" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA43-1.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=95bf977cd20688091495560a8b481241" className="hidden dark:block" width="1905" height="900" data-path="images/GA43-1.png" />
    </Frame>
  </Step>

  <Step title="Pick a data location" icon="globe">
    Select the region where you'll run your queries.

    <Warning>
      If you choose the wrong region and need to change it later, you'll have to move the dataset in Google Cloud and create a new link, or delete the link + dataset and start over.
    </Warning>
  </Step>

  <Step title="Choose export frequency" icon="clock-rotate-left">
    * **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.

    <Note>
      Streaming is **not** available on BigQuery sandbox accounts. Enable it later if you upgrade to a billing-enabled project.
    </Note>
  </Step>

  <Step title="Choose export frequency" icon="clock-rotate-left">
    * **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.

    <Note>
      Streaming is **not** available on BigQuery sandbox accounts. Enable it later if you upgrade to a billing-enabled project.
    </Note>

    <Frame caption="Choose your data location and export frequency">
      <img alt="GA44" lightAlt="GA44" darkAlt="GA44" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA44.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=0f18a08456f366be919afdc529319a82" className="dark:hidden" width="1217" height="530" data-path="images/GA44.png" />

      <img alt="GA44" lightAlt="GA44" darkAlt="GA44" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA44-1.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=48cebdd8c1babeb75fa2f85ec1e5f015" className="hidden dark:block" width="1217" height="530" data-path="images/GA44-1.png" />
    </Frame>

    <Frame caption="Choose your data location and export frequency">
      <img alt="GA44" lightAlt="GA44" darkAlt="GA44" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA44.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=0f18a08456f366be919afdc529319a82" className="dark:hidden" width="1217" height="530" data-path="images/GA44.png" />

      <img alt="GA44" lightAlt="GA44" darkAlt="GA44" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA44-1.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=48cebdd8c1babeb75fa2f85ec1e5f015" className="hidden dark:block" width="1217" height="530" data-path="images/GA44-1.png" />
    </Frame>
  </Step>

  <Step title="Optional — add another stream or event filter" icon="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.
  </Step>

  <Step title="Submit" icon="paper-plane">
    Review the settings and click **Submit**. The BigQuery link is created — first data takes up to **24 hours** to appear in BigQuery.
  </Step>
</Steps>

<Tip>
  When you link GA4 to BigQuery, Google creates a service account `firebase-measurement@system.gserviceaccount.com`. Verify it's been added as a project member with the **BigQuery User** role. If it was given **Editor** previously, you'll need to unlink and relink GA4 to BigQuery to change the role.
</Tip>

When data starts flowing, GA4 writes `events_*` tables into a dataset named `analytics_PROPERTY_ID` inside the selected project.

***

## <Icon icon="user-gear" /> Step 2 · Create a service account with BigQuery access

<Steps>
  <Step title="Open IAM & Admin → Service Accounts" icon="window">
    In Google Cloud console, open the same project and navigate to **IAM & Admin → Service Accounts**.
  </Step>

  <Step title="Open IAM & Admin → Service AccountsOpen IAM & Admin → Service Accounts" icon="window">
    In Google Cloud console, open the same project and navigate to **IAM & Admin → Service Accounts**In Google Cloud console, open the same project and navigate to **IAM & Admin → Service Accounts**.

    <Frame caption="IAM & Admin → Service Accounts">
      <img alt="GA45" lightAlt="GA45" darkAlt="GA45" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA45.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=39c39092760937aa697da776f5672755" className="dark:hidden" width="634" height="582" data-path="images/GA45.png" />

      <img alt="GA45" lightAlt="GA45" darkAlt="GA45" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA45-1.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=f28781524dd099482c830f0ba7b16073" className="hidden dark:block" width="634" height="582" data-path="images/GA45-1.png" />
    </Frame>

    <Frame caption="IAM & Admin → Service Accounts">
      <img alt="GA45" lightAlt="GA45" darkAlt="GA45" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA45.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=39c39092760937aa697da776f5672755" className="dark:hidden" width="634" height="582" data-path="images/GA45.png" />

      <img alt="GA45" lightAlt="GA45" darkAlt="GA45" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA45-1.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=f28781524dd099482c830f0ba7b16073" className="hidden dark:block" width="634" height="582" data-path="images/GA45-1.png" />
    </Frame>
  </Step>

  <Step title="Create the service accountCreate the service account" icon="user-plus">
    Click **+ Create Service Account**, name it (e.g., `ocular-ga4-reader`), and click **Create and Continue**.Click **+ Create Service Account**, name it (e.g., `ocular-ga4-reader`), and click **Create and Continue**.
  </Step>

  <Step title="Create the service account" icon="user-plus">
    Click **+ Create Service Account**, name it (e.g., `ocular-ga4-reader`), and click **Create and Continue**.

    <Frame caption="Name the service account">
      <img alt="GA46" lightAlt="GA46" darkAlt="GA46" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA46.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=a1b399b3b1c569c410b776adf5a2dc02" className="dark:hidden" width="751" height="497" data-path="images/GA46.png" />

      <img alt="GA46" lightAlt="GA46" darkAlt="GA46" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA46-1.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=316efa7542fcf07348c9decc40c5be94" className="hidden dark:block" width="751" height="497" data-path="images/GA46-1.png" />
    </Frame>
  </Step>

  <Step title="Grant roles" icon="shield-check">
    Add these three roles:

    <CardGroup cols={3}>
      <Card title="BigQuery Data Viewer" icon="eye">
        Read dataset and table data.
      </Card>

      <Card title="BigQuery Job User" icon="play">
        Run BigQuery jobs in the project.
      </Card>

      <Card title="BigQuery Read Session User" icon="bolt">
        Faster reads on large tables.
      </Card>
    </CardGroup>
  </Step>

  <Step title="Grant roles" icon="shield-check">
    Add these three roles:

    <CardGroup cols={3}>
      <Card title="BigQuery Data Viewer" icon="eye">
        Read dataset and table data.
      </Card>

      <Card title="BigQuery Job User" icon="play">
        Run BigQuery jobs in the project.
      </Card>

      <Card title="BigQuery Read Session User" icon="bolt">
        Faster reads on large tables.
      </Card>
    </CardGroup>

    <Frame caption="Grant the three BigQuery roles">
      <img alt="GA47" lightAlt="GA47" darkAlt="GA47" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA47.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=0b0c952dcf8e13cacdcf859468d92e9f" className="dark:hidden" width="761" height="585" data-path="images/GA47.png" />

      <img alt="GA47" lightAlt="GA47" darkAlt="GA47" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA47-1.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=0985a855eaeb09015a16bf0a8fad9ac1" className="hidden dark:block" width="761" height="585" data-path="images/GA47-1.png" />
    </Frame>
  </Step>

  <Step title="Create a JSON key" icon="key">
    Click **Done**, open the service account, then **Keys → Add key → Create new key → JSON**. Save the file securely — it contains the service-account key Ocular will use.
  </Step>

  <Step title="Create the service account" icon="user-plus">
    Click **+ Create Service Account**, name it (e.g., `ocular-ga4-reader`), and click **Create and Continue**.

    <Frame caption="Name the service account">
      <img alt="GA46" lightAlt="GA46" darkAlt="GA46" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA46.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=a1b399b3b1c569c410b776adf5a2dc02" className="dark:hidden" width="751" height="497" data-path="images/GA46.png" />

      <img alt="GA46" lightAlt="GA46" darkAlt="GA46" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA46-1.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=316efa7542fcf07348c9decc40c5be94" className="hidden dark:block" width="751" height="497" data-path="images/GA46-1.png" />
    </Frame>
  </Step>

  <Step title="Grant roles" icon="shield-check">
    Add these three roles:

    <CardGroup cols={3}>
      <Card title="BigQuery Data Viewer" icon="eye">
        Read dataset and table data.
      </Card>

      <Card title="BigQuery Job User" icon="play">
        Run BigQuery jobs in the project.
      </Card>

      <Card title="BigQuery Read Session User" icon="bolt">
        Faster reads on large tables.
      </Card>
    </CardGroup>
  </Step>

  <Step title="Grant roles" icon="shield-check">
    Add these three roles:

    <CardGroup cols={3}>
      <Card title="BigQuery Data Viewer" icon="eye">
        Read dataset and table data.
      </Card>

      <Card title="BigQuery Job User" icon="play">
        Run BigQuery jobs in the project.
      </Card>

      <Card title="BigQuery Read Session User" icon="bolt">
        Faster reads on large tables.
      </Card>
    </CardGroup>

    <Frame caption="Grant the three BigQuery roles">
      <img alt="GA47" lightAlt="GA47" darkAlt="GA47" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA47.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=0b0c952dcf8e13cacdcf859468d92e9f" className="dark:hidden" width="761" height="585" data-path="images/GA47.png" />

      <img alt="GA47" lightAlt="GA47" darkAlt="GA47" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA47-1.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=0985a855eaeb09015a16bf0a8fad9ac1" className="hidden dark:block" width="761" height="585" data-path="images/GA47-1.png" />
    </Frame>
  </Step>

  <Step title="Create a JSON key" icon="key">
    Click **Done**, open the service account, then **Keys → Add key → Create new key → JSON**. Save the file securely — it contains the service-account key Ocular will use.
  </Step>

  <Step title="Create a JSON key" icon="key">
    Click **Done**, open the service account, then **Keys → Add key → Create new key → JSON**. Save the file securely — it contains the service-account key Ocular will use.

    <Frame caption="Open the Keys tab → Add key">
      <img alt="GA48" lightAlt="GA48" darkAlt="GA48" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA48.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=df5e73d52433bb8f14dfd7a7110c80a0" className="dark:hidden" width="614" height="405" data-path="images/GA48.png" />

      <img alt="GA48" lightAlt="GA48" darkAlt="GA48" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA48-1.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=06b00e8eb9da2894732d9905e8d18bab" className="hidden dark:block" width="614" height="405" data-path="images/GA48-1.png" />
    </Frame>

    <Frame caption="Add key → Create new key">
      <img alt="GA49" lightAlt="GA49" darkAlt="GA49" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA49.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=2c657c4f202050ad2d6a2cd767a19424" className="dark:hidden" width="639" height="477" data-path="images/GA49.png" />

      <img alt="GA49" lightAlt="GA49" darkAlt="GA49" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA49-1.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=7734d6568f074d3acdefccc2e0cbd3fe" className="hidden dark:block" width="639" height="477" data-path="images/GA49-1.png" />
    </Frame>

    <Frame caption="Choose JSON and create">
      <img alt="GA450" lightAlt="GA450" darkAlt="GA450" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA450.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=92f2f16f7ab459269415d17521d580a5" className="dark:hidden" width="645" height="411" data-path="images/GA450.png" />

      <img alt="GA450" lightAlt="GA450" darkAlt="GA450" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA450-1.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=5264fea738a0b74a441a116bf661edf3" className="hidden dark:block" width="645" height="411" data-path="images/GA450-1.png" />
    </Frame>

    <Frame caption="Open the Keys tab → Add key">
      <img alt="GA48" lightAlt="GA48" darkAlt="GA48" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA48.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=df5e73d52433bb8f14dfd7a7110c80a0" className="dark:hidden" width="614" height="405" data-path="images/GA48.png" />

      <img alt="GA48" lightAlt="GA48" darkAlt="GA48" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA48-1.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=06b00e8eb9da2894732d9905e8d18bab" className="hidden dark:block" width="614" height="405" data-path="images/GA48-1.png" />
    </Frame>

    <Frame caption="Add key → Create new key">
      <img alt="GA49" lightAlt="GA49" darkAlt="GA49" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA49.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=2c657c4f202050ad2d6a2cd767a19424" className="dark:hidden" width="639" height="477" data-path="images/GA49.png" />

      <img alt="GA49" lightAlt="GA49" darkAlt="GA49" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA49-1.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=7734d6568f074d3acdefccc2e0cbd3fe" className="hidden dark:block" width="639" height="477" data-path="images/GA49-1.png" />
    </Frame>

    <Frame caption="Choose JSON and create">
      <img alt="GA450" lightAlt="GA450" darkAlt="GA450" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA450.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=92f2f16f7ab459269415d17521d580a5" className="dark:hidden" width="645" height="411" data-path="images/GA450.png" />

      <img alt="GA450" lightAlt="GA450" darkAlt="GA450" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA450-1.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=5264fea738a0b74a441a116bf661edf3" className="hidden dark:block" width="645" height="411" data-path="images/GA450-1.png" />
    </Frame>
  </Step>
</Steps>

<Note>
  Full Google reference: [Creating and managing service accounts](https://cloud.google.com/iam/docs/service-accounts-create).
</Note>

***

## <Icon icon="users" /> Step 3 · Give the service account access to the GA4 property

<Steps>
  <Step title="Copy the service account email" icon="copy">
    From IAM & Admin, copy the service account's email address.
  </Step>

  <Step title="Open GA4 Property Access Management" icon="shield">
    In GA4, go to **Admin → Property Access Management**, then click **+ → Add users**.
  </Step>

  <Step title="Add the service account as Viewer" icon="user-check">
    Paste the email, assign the **Viewer** (read-only) role, and click **Save**.
  </Step>
</Steps>

The service account can now query GA4 event tables via BigQuery without using OAuth.

***

## <Icon icon="magnifying-glass" /> Step 4 · Find your schema name, Property ID,schema name, Property ID, and location

### Schema name

<Steps>
  <Step title="Open BigQuery" icon="server">
    In Google Cloud Console, navigate to **BigQuery**.
  </Step>

  <Step title="Expand your project" icon="folder-tree">
    In the **Explorer** panel, expand your Project ID.
  </Step>

  <Step title="Find the analytics_ dataset" icon="database">
    Look for a dataset named `analytics_` followed by your GA4 property ID. The full string is your schema name — e.g., `analytics_123456789`.
  </Step>
</Steps>

<Frame caption="The analytics_* dataset in the BigQuery Explorer">
  <img alt="GA4 schema name" lightAlt="GA4 schema name" darkAlt="GA4 schema name" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA4schemaname.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=fdd2d47faa81f9ea3011c2264e976208" className="dark:hidden" width="1911" height="623" data-path="images/GA4schemaname.png" />

  <img alt="GA4 schema name" lightAlt="GA4 schema name" darkAlt="GA4 schema name" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA4schemaname-1.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=aec1456a8d398f70edf8a41d7b20b97b" className="hidden dark:block" width="1911" height="623" data-path="images/GA4schemaname-1.png" />
</Frame>

### Property ID

<Steps>
  <Step title="Open your account" icon="building">
    In Google Analytics, click on your account / company name.
  </Step>

  <Step title="Read the Property ID" icon="hashtag">
    The Property ID is listed under **Properties & Apps**. It's a numeric value (e.g., `123456789`).
  </Step>
</Steps>

<Frame caption="Property ID listed under Properties & Apps">
  <img alt="GA451" lightAlt="GA451" darkAlt="GA451" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA451.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=51bfa4da0e5387720fc5af78b1fef44b" className="dark:hidden" width="1625" height="840" data-path="images/GA451.png" />

  <img alt="GA451" lightAlt="GA451" darkAlt="GA451" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA451-1.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=a9e7e8138fc1d7ac3f57c069750eda7e" className="hidden dark:block" width="1625" height="840" data-path="images/GA451-1.png" />
</Frame>

### Dataset location

<Steps>
  <Step title="Click the dataset" icon="mouse-pointer">
    Click on the `analytics_*` dataset in the BigQuery Explorer.
  </Step>

  <Step title="Read Data location" icon="globe">
    In the **Dataset info** panel on the right, find **Data location**. Note the region (e.g., `US`, `EU`, `asia-southeast1`).
  </Step>
</Steps>

<Frame caption="Data location in the Dataset info panel">
  <img alt="GA452" lightAlt="GA452" darkAlt="GA452" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA452.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=b766c260100e0e8f1c02deb192704bfd" className="dark:hidden" width="1913" height="890" data-path="images/GA452.png" />

  <img alt="GA452" lightAlt="GA452" darkAlt="GA452" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA452-1.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=f3eda0d2e2663266e9eeb305fae9e084" className="hidden dark:block" width="1913" height="890" data-path="images/GA452-1.png" />
</Frame>

<Frame caption="The analytics_* dataset in the BigQuery Explorer">
  <img alt="GA4 schema name" lightAlt="GA4 schema name" darkAlt="GA4 schema name" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA4schemaname.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=fdd2d47faa81f9ea3011c2264e976208" className="dark:hidden" width="1911" height="623" data-path="images/GA4schemaname.png" />

  <img alt="GA4 schema name" lightAlt="GA4 schema name" darkAlt="GA4 schema name" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA4schemaname-1.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=aec1456a8d398f70edf8a41d7b20b97b" className="hidden dark:block" width="1911" height="623" data-path="images/GA4schemaname-1.png" />
</Frame>

### Property ID

<Steps>
  <Step title="Open your account" icon="building">
    In Google Analytics, click on your account / company name.
  </Step>

  <Step title="Read the Property ID" icon="hashtag">
    The Property ID is listed under **Properties & Apps**. It's a numeric value (e.g., `123456789`).
  </Step>
</Steps>

<Frame caption="Property ID listed under Properties & Apps">
  <img alt="GA451" lightAlt="GA451" darkAlt="GA451" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA451.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=51bfa4da0e5387720fc5af78b1fef44b" className="dark:hidden" width="1625" height="840" data-path="images/GA451.png" />

  <img alt="GA451" lightAlt="GA451" darkAlt="GA451" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA451-1.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=a9e7e8138fc1d7ac3f57c069750eda7e" className="hidden dark:block" width="1625" height="840" data-path="images/GA451-1.png" />
</Frame>

### Dataset location

<Steps>
  <Step title="Click the dataset" icon="mouse-pointer">
    Click on the `analytics_*` dataset in the BigQuery Explorer.
  </Step>

  <Step title="Read Data location" icon="globe">
    In the **Dataset info** panel on the right, find **Data location**. Note the region (e.g., `US`, `EU`, `asia-southeast1`).
  </Step>
</Steps>

<Frame caption="Data location in the Dataset info panel">
  <img alt="GA452" lightAlt="GA452" darkAlt="GA452" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA452.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=b766c260100e0e8f1c02deb192704bfd" className="dark:hidden" width="1913" height="890" data-path="images/GA452.png" />

  <img alt="GA452" lightAlt="GA452" darkAlt="GA452" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/GA452-1.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=f3eda0d2e2663266e9eeb305fae9e084" className="hidden dark:block" width="1913" height="890" data-path="images/GA452-1.png" />
</Frame>

Or run this query to get both values at once:

```sql theme={null}
SELECT schema_name, location
FROM `your-project-id.INFORMATION_SCHEMA.SCHEMATA`
WHERE schema_name LIKE 'analytics_%';
```

***

## <Icon icon="plug" /> Step 5 · Plug the credentials into Ocular

<Steps>
  <Step title="Open the connector form" icon="window">
    In Ocular, open **Data Management → Connectors → Add connector → Google Analytics 4**.
  </Step>

  <Step title="Open the connector form" icon="window">
    In Ocular, open **Data Management → Connectors → Add connector → Google Analytics 4**.

    <Frame caption="GA4 connector form in Ocular">
      <img alt="GA4 connector form" lightAlt="GA4 connector form" darkAlt="GA4 connector form" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/image-20260406-100015.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=1fbd0c5ce17ec1462549896b3b1bc247" className="dark:hidden" width="1898" height="943" data-path="images/image-20260406-100015.png" />

      <img alt="GA4 connector form" lightAlt="GA4 connector form" darkAlt="GA4 connector form" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/image-20260406-100015-1.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=443fe4cadf89b5355ad0aa00b008cbfc" className="hidden dark:block" width="1898" height="943" data-path="images/image-20260406-100015-1.png" />
    </Frame>
  </Step>

  <Step title="Fill the fields" icon="pen-to-square">
    <CardGroup cols={2}>
      <Card title="Connector Name" icon="tag">
        Any name you choose.
      </Card>

      <Card title="Project ID" icon="server">
        Your Google Cloud project ID.
      </Card>

      <Card title="Service-account JSON key" icon="key">
        Upload or paste the JSON file contents from Step 2.
      </Card>

      <Card title="Schema name" icon="database">
        The `analytics_*` dataset name from Step 4.
      </Card>

      <Card title="Start Date" icon="calendar">
        Earliest date for data sync (e.g., `2023-01-01`).
      </Card>

      <Card title="Location of the BigQuery" icon="globe">
        The region from Step 4.
      </Card>
    </CardGroup>
  </Step>

  <Step title="Open the connector form" icon="window">
    In Ocular, open **Data Management → Connectors → Add connector → Google Analytics 4**.

    <Frame caption="GA4 connector form in Ocular">
      <img alt="GA4 connector form" lightAlt="GA4 connector form" darkAlt="GA4 connector form" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/image-20260406-100015.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=1fbd0c5ce17ec1462549896b3b1bc247" className="dark:hidden" width="1898" height="943" data-path="images/image-20260406-100015.png" />

      <img alt="GA4 connector form" lightAlt="GA4 connector form" darkAlt="GA4 connector form" src="https://mintcdn.com/ocular/SLKbQDUMCoOa2jsd/images/image-20260406-100015-1.png?fit=max&auto=format&n=SLKbQDUMCoOa2jsd&q=85&s=443fe4cadf89b5355ad0aa00b008cbfc" className="hidden dark:block" width="1898" height="943" data-path="images/image-20260406-100015-1.png" />
    </Frame>
  </Step>

  <Step title="Fill the fields" icon="pen-to-square">
    <CardGroup cols={2}>
      <Card title="Connector Name" icon="tag">
        Any name you choose.
      </Card>

      <Card title="Project ID" icon="server">
        Your Google Cloud project ID.
      </Card>

      <Card title="Service-account JSON key" icon="key">
        Upload or paste the JSON file contents from Step 2.
      </Card>

      <Card title="Schema name" icon="database">
        The `analytics_*` dataset name from Step 4.
      </Card>

      <Card title="Start Date" icon="calendar">
        Earliest date for data sync (e.g., `2023-01-01`).
      </Card>

      <Card title="Location of the BigQuery" icon="globe">
        The region from Step 4.
      </Card>
    </CardGroup>
  </Step>

  <Step title="Fill the fields" icon="pen-to-square">
    <CardGroup cols={2}>
      <Card title="Connector Name" icon="tag">
        Any name you choose.
      </Card>

      <Card title="Start DateStart Date" icon="calendar">
        Earliest date for data sync (e.g., `2023-01-01`)Earliest date for data sync (e.g., `2023-01-01`).
      </Card>

      <Card title="Lookback DaysLookback Days" icon="clock-rotate-left">
        Number of past days re-fetched on each sync so late-updating data stays current. Default is 30 daysNumber of past days re-fetched on each sync so late-updating data stays current. Default is 30 days.
      </Card>

      <Card title="Events Start DatEvents Start Date" icon="calendar-day">
        The date from which you want to start loading events datadate from which you want to start loading events data.
      </Card>

      <Card title="UTM Attribution LevelUTM Attribution Level" icon="bullseye">
        Choose **Campaign** if your UTMs are defined at the campaign level, or **Ad** if they're defined at the ad level — attribution is applied at the level you pickChoose **Campaign** if your UTMs are defined at the campaign level, or **Ad** if they're defined at the ad level — attribution is applied at the level you pick.
      </Card>

      <Card title="Schema name" icon="database">
        The `analytics_*` dataset name from Step 4.
      </Card>

      <Card title="Service-account JSON key" icon="key">
        Upload or paste the JSON file contents from Step 2.
      </Card>

      <Card title="Project ID" icon="server">
        Automatically extracted from your service-account JSON file.
      </Card>

      <Card title="GA4 Property ID" icon="hashtag">
        Your GA4 Property ID — see Step 4 for where to find it.
      </Card>

      <Card title="Schema name" icon="database">
        The `analytics_*` dataset name from Step 4.
      </Card>

      <Card title="Service-account JSON key" icon="key">
        Upload or paste the JSON file contents from Step 2.
      </Card>

      <Card title="Project ID" icon="server">
        Automatically extracted from your service-account JSON file.
      </Card>

      <Card title="GA4 Property ID" icon="hashtag">
        Your GA4 Property ID — see Step 4 for where to find it.
      </Card>

      <Card title="Location of the BigQuery" icon="globe">
        The region from Step 4.
      </Card>
    </CardGroup>
  </Step>

  <Step title="Create the connection" icon="circle-check">
    Click **Create Connection**. Ocular validates the key by running `SELECT COUNT(1) FROM .analytics_* LIMIT 1`.

    On success, click **Create** — the first daily sync kicks off automatically.
  </Step>
</Steps>

***

## <Icon icon="life-ring" /> Troubleshooting

<AccordionGroup>
  <Accordion title="No data in BigQuery after linking" icon="clock-rotate-left">
    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.com` is a project member with the **BigQuery User** role.
    * You haven't hit the 1-million-events daily cap on a sandbox project.
  </Accordion>

  <Accordion title="Connection succeeds but Ocular sees no rows" icon="triangle-exclamation">
    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.
  </Accordion>

  <Accordion title="Permission denied on BigQuery" icon="lock">
    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.
  </Accordion>

  <Accordion title="Need to change the region after linking" icon="globe">
    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.
  </Accordion>
</AccordionGroup>

<Note>
  For ticket-writing format when filing a connector issue, see [Working with the Ocular team → Connector-not-working tickets](/overview/working-with-the-ocular-team).
</Note>

***

## <Icon icon="clock-rotate-left" /> GA4 Historical Connector

The GA4 Historical connector lets you import historical Google Analytics 4 data through the **Google Analytics Reporting API** — without needing a BigQuery export pipeline. Unlike the standard GA4 connector above, this one pulls pre-aggregated report data directly from the GA4 API.

This is particularly useful when you need to:

* Analyze data from **before** your GA4–BigQuery integration was set up
* Access aggregated metrics and dimensions that may be pre-processed by Google
* Backfill historical data for specific time periods
* Pull historical reporting data without setting up the full BigQuery export pipeline

<CardGroup cols={2}>
  <Card title="What you need" icon="key">
    GA4 Property ID, Google Cloud Project ID, Service Account JSON key, and a Project Location.
  </Card>

  <Card title="What it unlocks" icon="clock-rotate-left">
    Pre-aggregated GA4 reporting data for historical periods not covered by your BigQuery export.
  </Card>
</CardGroup>

<Note>
  **Prerequisites:** A GA4 property with historical data, a Google Cloud project with the Google Analytics Reporting API enabled, and a service account with Viewer role on the GA4 property.
</Note>

***

### <Icon icon="signs-post" /> Step H1 · Locate your GA4 Property ID

<Steps>
  <Step title="Open your GA4 property" icon="arrow-up-right-from-square">
    Go to your GA4 property in the Google Analytics interface.
  </Step>

  <Step title="Find the Property ID" icon="copy">
    The Property ID can be found in your GA4 property settings or in the URL of your GA4 property. It's a numeric value (e.g., `123456789`).
  </Step>
</Steps>

<Tip>
  If you're not sure where to find it, check the URL when viewing your GA4 property — it will contain the Property ID.
</Tip>

***

### <Icon icon="user-gear" /> Step H2 · Create a service account with appropriate permissions

<Steps>
  <Step title="Open IAM & Admin → Service Accounts" icon="window">
    In Google Cloud console, open your project and navigate to **IAM & Admin → Service Accounts**.
  </Step>

  <Step title="Create the service account" icon="user-plus">
    Click **+ Create Service Account**, name it (e.g., `ocular-ga4-reader`), and click **Create and Continue**.
  </Step>

  <Step title="Grant roles" icon="shield-check">
    Add these roles:

    <CardGroup cols={2}>
      <Card title="BigQuery Data Viewer" icon="eye">
        Read dataset and table data.
      </Card>

      <Card title="BigQuery Job User" icon="play">
        Run BigQuery jobs in the project.
      </Card>

      <Card title="BigQuery Read Session User" icon="bolt">
        Faster reads on large tables.
      </Card>

      <Card title="Google Analytics Admin" icon="chart-line">
        Access the GA4 Reporting API.
      </Card>
    </CardGroup>
  </Step>

  <Step title="Create a JSON key" icon="key">
    Click **Done**, open the service account, then **Keys → Add key → Create new key → JSON**. Save the file securely.
  </Step>

  <Step title="Add service account to GA4" icon="user-check">
    Copy the service account email address. In GA4, go to **Admin → Property Access Management**, click **+ → Add users**, paste the email, assign the **Viewer** role, and click **Save**.
  </Step>
</Steps>

<Note>
  If you are not sure how to create a service account, follow the [Google Cloud Service Account documentation](https://cloud.google.com/iam/docs/service-accounts-create).
</Note>

***

### <Icon icon="plug" /> Step H3 · Set up the connector in Ocular

<Steps>
  <Step title="Open the connector form" icon="window">
    In Ocular, navigate to **Data Management → Connectors → Add connector → GA4 Historical**.
  </Step>

  <Step title="Fill the fields" icon="pen-to-square">
    <CardGroup cols={2}>
      <Card title="Connector Name" icon="tag">
        A descriptive name for your connector (e.g., `GA4 Historical Main`).
      </Card>

      <Card title="Start Date (optional)" icon="calendar">
        The date from which you want to start loading data. Leave empty to use the default configuration.
      </Card>

      <Card title="GA4 Property ID" icon="hashtag">
        Your Google Analytics 4 Property ID (e.g., `123456789`).
      </Card>

      <Card title="Project Location" icon="globe">
        The geographic location where your Google Cloud project is located (e.g., Asia South 1 (Mumbai)).
      </Card>

      <Card title="Service Account JSON" icon="key">
        Upload your JSON key file or paste its contents. The Google Cloud Project ID is automatically extracted from this file.
      </Card>
    </CardGroup>
  </Step>

  <Step title="Fill the fields" icon="pen-to-square">
    <CardGroup cols={2}>
      <Card title="Connector Name" icon="tag">
        A descriptive name for your connector (e.g., `GA4 Historical Main`).
      </Card>

      <Card title="Start Date (optional)" icon="calendar">
        The date from which you want to start loading data. Leave empty to use the default configuration.
      </Card>

      <Card title="GA4 Property ID" icon="hashtag">
        Your Google Analytics 4 Property ID (e.g., `123456789`).
      </Card>

      <Card title="Project Location" icon="globe">
        The geographic location where your Google Cloud project is located (e.g., Asia South 1 (Mumbai)).
      </Card>

      <Card title="Service Account JSON" icon="key">
        Upload your JSON key file or paste its contents. The Google Cloud Project ID is automatically extracted from this file.
      </Card>
    </CardGroup>

    <Frame caption="GA4 Historical connector form">
      ![GA4 Historical connector form screenshot](https://placehold.co/1500x760/fff5f0/E34400?text=GA4+Historical+Connector+Form)
    </Frame>
  </Step>

  <Step title="Fill the fields" icon="pen-to-square">
    <CardGroup cols={2}>
      <Card title="Connector Name" icon="tag">
        A descriptive name for your connector (e.g., `GA4 Historical Main`).
      </Card>

      <Card title="Start Date (optional)" icon="calendar">
        The date from which you want to start loading data. Leave empty to use the default configuration.
      </Card>

      <Card title="GA4 Property ID" icon="hashtag">
        Your Google Analytics 4 Property ID (e.g., `123456789`).
      </Card>

      <Card title="Project Location" icon="globe">
        The geographic location where your Google Cloud project is located (e.g., Asia South 1 (Mumbai)).
      </Card>

      <Card title="Service Account JSON" icon="key">
        Upload your JSON key file or paste its contents. The Google Cloud Project ID is automatically extracted from this file.
      </Card>
    </CardGroup>
  </Step>

  <Step title="Fill the fields" icon="pen-to-square">
    <CardGroup cols={2}>
      <Card title="Connector Name" icon="tag">
        A descriptive name for your connector (e.g., `GA4 Historical Main`).
      </Card>

      <Card title="Start Date (optional)" icon="calendar">
        The date from which you want to start loading data. Leave empty to use the default configuration.
      </Card>

      <Card title="GA4 Property ID" icon="hashtag">
        Your Google Analytics 4 Property ID (e.g., `123456789`).
      </Card>

      <Card title="Project Location" icon="globe">
        The geographic location where your Google Cloud project is located (e.g., Asia South 1 (Mumbai)).
      </Card>

      <Card title="Service Account JSON" icon="key">
        Upload your JSON key file or paste its contents. The Google Cloud Project ID is automatically extracted from this file.
      </Card>
    </CardGroup>
  </Step>
</Steps>

***

### <Icon icon="flask-vial" /> Step H4 · Test and create the connection

<Steps>
  <Step title="Test the connection" icon="flask-vial">
    Click **Test Connection** to verify your credentials and API access.
  </Step>

  <Step title="Create the connector" icon="circle-check">
    Once successful, click **Update Connector** to create the connection and begin retrieving historical GA4 data.
  </Step>
</Steps>

<Note>
  Unlike the standard GA4 connector that pulls raw event data from BigQuery, the Historical connector uses the Google Analytics Reporting API to retrieve pre-aggregated data. This means it may have different metrics and dimensions available than what you'd find in the raw BigQuery export.
</Note>
