Sharing GA4 Data through BigQuery

This tutorial describes step by step how share GA4 data with Roivenue using Google BigQuery.

What are the necessities?

  1. GA4 measurement set up

  2. Google Cloud Project* in Big Query with billing details**

* Don't have a Google cloud account yet? Create your account now. ** Set up the billing details here. The billing details are necessary to have the most recent data in the export, otherwise you will have 2 days lag of the exported data. You will not be charged anything unless you switch to a paid plan. If you have a lot of data (10+ mil. sessions monthly), the pricing can be found here. The Big Query is rather cheap and you get plenty of storage and queries monthly for free (more than enough to cover Roivenue integration).

Permissions required?

The set up will have to be done by a person with certain rights. These are:

  1. At least Editor permissions in the GA4 property

  2. Google Cloud Project owner

  3. Read access to Google Ads

Content of This Tutorial

  1. Connection of GA4 and Big Query

    1. How to create a project.

    2. How to link GA4 with Big Query.

  2. Connection of Google Ads and Big Query

    1. How to link Google Ads and Big Query

GA4 <-> Big Query Connection

If you already have streaming export running, skip this part.

1. Create a GCP project

If you do not have any project created in Big Query yet, create your first one.

The page will look like this:

Fill in the project name, select your organisation and location. The name can be anything - for example - Ga4BigQueryExport. For the remaining 2 fields you should have just 1 option in each. Then create the project.

Permissions required:

  1. Editor rights in GA4 property or higher

  2. Big Query project owner (if you completed Step 1 you already have this permission)

Head to Google Analytics 4 property which you want to connect to Roivenue, and go to settings (gear button in the left bottom corner). Under Property settings -> Product links select BigQuery links.

Create a new link by clicking the "Link" button. Screen like this will pop up:

A. Select the project from Step 1.

B. Data location - select European Union (EU)

C. Type of export - select streaming.

(If you select daily export, you will not have data for the previous day!)

D. Events to exclude - none.

This will create an export of data from GA4 to Big Query.

Google Ads <-> Big Query export

If you do not use auto-tagging (not likely), skip this part.

(At the moment, there is one unresolved issue on Google's side, and that is the Google Ads data issue. This issue concerns only accounts with auto-tagging turned on.)

Permissions required:

  1. Big Query Admin role on project level

  2. Google Ads read permissions

Firstly you will have to activate Google Big Query API - you can do so here.

Link of Google Ads to big query is done in Big Query -> data transfers -> new transfer ->

Google Ads.

You will be asked to fill in these details:

  1. Display name - name of the import, it can be anything.

  2. Schedule - Repeat frequency = Days, At = 00:30

  3. Start now

  4. Dataset - create a new dataset where we will feed the Google Ads data.

    It should look like this: a. Make sure to select the same location as for your Google Analytics data!

5. Customer ID - add ID from Google Ads (eg. 5xx-0x5-5xxx) (can be found in your Google Ads account in the top right corner) a. If you have multiple accounts, connect your MCC (to save some time)

  1. Refresh window - blank

  2. Leave the rest in default state


    At this moment, the set-up should be successfully finished. We can connect your data to Roivenue. —---------------------

Sharing access to BQ with Roivenue

To do so, we will need you to invite user - to both (GA4 and Google Ads) of your new datasets as Google Big Query Viewer and as a Google Big Query Job User to your project.

Viewer permissions

  1. New tab will open. Click “add principal”.

4. Repeat the process for all Google Analytics properties.

Job User

Open a Big Query Menu (Left top corner 3 lines next to “Google Cloud”. Head to IAM & Admin > IAM. Click "Grant Access". Same window as for the Data Viewer will open. Use the same email, select BigQuery Job User as role.

At this moment, your BigQuery is connected to the Roivenue. Inform your Client Success Manager that the accesses were given.

Last updated