🔥 Google Sheets integration is live! Learn more
In this guide, we'll import data from Google Analytics 4 into Airtable. We'll use the Data Fetcher Airtable app to automatically pull in Google Analytics 4 metrics such as users, sessions & new users. This guide is for Google Analytics 4 (GA4) which is replacing Universal Analytics (UA). If you are using Universal Analytics (UA) you can find the instructions at the bottom of this article. If you are not sure which version of Google Analytics you are using, you can find out here.
Install Data Fetcher from the Airtable app marketplace. After the app launches, sign up for a free Data Fetcher account by entering a password and clicking 'Sign up for free'. If you already have a Data Fetcher account, sign in using the 'Have an account?' button at the bottom left of the box.
On the home screen of the Data Fetcher app, click 'Create your first request'. Requests in Data Fetcher are how you import data to or send data from your Airtable base.
On the create request screen in Data Fetcher, for Application, select 'Google Analytics 4'.
Click 'New Google Analytics 4 Connection'.
You will be taken to a new tab/window where you need to authorize Data Fetcher to access your Google Analytics 4 account. Select the Google account you want to import Google Analytics 4 data from. On the next screen make sure you check the View and manage your Google Analytics data checkbox before clicking 'Continue'.
You should now be back in the Data Fetcher interface with the Google Analytics 4 connection set up. Enter a Name for your request, e.g. 'Import GA Metrics'. Then click 'Save & Continue'.
Select the Google Analytics 4 Account, Property and View you want to import data for.
Select the Date range you want to import data for, e.g. 'Last week'. Select the Fields you want to import from Google Analytics 4, e.g. 'Total Users', 'New users' & 'Sessions'.
Select a value for Split by to split the data into different records. e.g. select 'Date' to get a different record for each date.
Select the Output Table & View you want to import Google Analytics 4 data into.
Click 'Save & Run'.
You can use filters to only import certain data from Google Analytics 4 based on specific criteria. In Data Fetcher, under Filters, click 'Add Filter', then select the conditions you want to filter. For example, you could just import data for pages that contain '/blog/':
Or you could specify only data gathered through a certain browser:
The request will run and the Response field mapping modal will open. This is where you set how the fields from Google Analytics 4 will map to fields in the output table. For each Google Analytics field, you can either import or filter it. For an imported field, you can set whether to map them to an existing field or create a new field. Once you are happy, click 'Save & Run'.
Data Fetcher will create any fields that need to be created in the output table, then run the request and import the data from Google Analytics 4 to Airtable. If you want to run the request again, simply click 'Run'. If nothing has changed, you will not need to set up the response field mapping again.
With this setup, we'd have to manually run the request to import the data Google Analytics 4, but we can also use Data Fetcher's scheduled requests feature and automatically import this data every 15 minutes/ hour/ day etc.
In Data Fetcher, scroll to Schedule and click 'Upgrade'.
A new window opens up for you to select a payment plan and enter your details to upgrade.
Now return to the Data Fetcher app and click 'I've done this'.
Choose 'Add API key' and copy and paste your Airtable API key. You can find your Airtable API key here.
Enter your Airtable API key here then 'Save'.
Enable Schedule this request.
Select how often you want the request to run, e.g. 'Every Day' or for one day per week, select a day, e.g. 'Mo'. Click 'Save' The request will now run every Monday and automatically pull in Google Analytics 4 data for the previous week.
To import Universal Analytics (UA) data into Airtable, follow all the instructions above but on the create request screen in Data Fetcher, for Application, select 'Google Analytics'.