# Getting Croct experiment data into BigQuery, via GA4 export or directly?

Asked by gustav on 2025-05-08. Tags: bigquery, data-export, analytics.

We already pipe GA4 into BigQuery. Now we want Croct variant assignments in the
warehouse to join against revenue tables (some of which come from Snowflake via
transfer).

Two paths as I see it: rely on the GA4 BigQuery export since Croct already
streams into GA4, or pull from Croct directly if there is an API for it.

Which is the intended route? mainly care about completeness, GA4 processing has
burned us before

## 1 answer

### Accepted answer from Marcos Passos (2025-05-08)

Both paths work, and they serve different needs.

The GA4 route is the zero-effort one: the Croct dimensions exported to GA4
(audiences, experiences, experiments, variants) arrive as event data, so they
flow into your existing GA4 BigQuery export automatically. If your joins can
live with GA4's processing, you are done already.

For raw completeness, pull from Croct directly. The
[data-export client](https://docs.croct.com/reference/api/service/data-export/client)
offers three methods: `exportEvents`, `exportSessions`, and `exportUserById`. The
export service is part of the HTTP API, so you can also hit it without the
client: base URL is `https://api.croct.io` and authentication is an API key
in the `X-Api-Key` header.

Given that GA4 processing has burned you before, I would use the direct
export as the source of truth for the variant-to-revenue joins and keep the
GA4 copy for the analysts who live in that dataset anyway.

#### Reply from gustav (2025-05-09)

Direct export it is. Is the export paginated or streamed? Planning a daily
incremental load.

#### Reply from Marcos Passos (2025-05-09)

The client handles iteration for you, so a daily incremental job that
pulls events and sessions since the last run is the straightforward
pattern. Check the
[data-export client reference](https://docs.croct.com/reference/api/service/data-export/client)
in the docs for the exact parameters.
