Keep a daily GA4 or Search Console history
Two reliable setups for analytics data that arrives late - overwrite a rolling window in Google Sheets, or upsert a permanent history into Airtable.
Analytics numbers aren’t final straight away. Search Console runs two to three days behind, and GA4 keeps adjusting recent days. A job that appends “yesterday” every morning records incomplete numbers, and they are never corrected.
Two setups avoid this. Both re-fetch recent days on every run, so late numbers replace early ones.
Setup 1: Google Sheets, overwrite a rolling window
Best for dashboards and reports that look at the recent past.
- Source: GA4 or Search Console, with the date range set to Last 90 days (or Last 28 days for a smaller sheet). Include the date dimension. Without it, the whole window collapses into a single total.
- For Search Console, set the data state to Final — settled data only.
- Destination: Google Sheets, in a tab of its own, with write mode Overwrite.
- Schedule: daily.
Each run replaces the tab with the latest settled window. Point your charts and formulas at this tab from another tab.
This keeps only the window, not older history. For that, use setup 2.
Setup 2: Airtable, upsert a permanent history
Best for keeping history past the source’s own limits. For example, Search Console keeps only 16 months.
- Source: GA4 or Search Console, with the date range set to Last 7 days. Include the date dimension and the dimensions you report on, such as page or query.
- Destination: Airtable, with write mode Upsert.
- Merge fields: the fields that identify one row, for example
dateandpage. You can use at most three. - Schedule: daily.
Every run re-fetches the past week. Days that have settled since the last run update their earlier values, new days are added, and nothing is duplicated. The table grows by one day’s rows each day and keeps everything older.
Why not append “yesterday”?
Append writes whatever the source returned on that day, and never revisits it. On top of the incomplete numbers, a re-run after a failure writes the same day twice. See Write modes.