How to refresh GA4 reports in Google Sheets on a schedule
By Sascha Heyer. Updated 2026-12-02.
To refresh GA4 data in Google Sheets automatically, the report has to be run by something on a timer: an Apps Script that calls the GA4 Data API with a daily or weekly time-driven trigger, a connector add-on with a refresh schedule, or AskGA4 Pro, which refreshes saved reports daily or weekly while the sheet is closed. A GA4 export to Sheets never refreshes.
Steps
- Add the Analytics Data service. In the spreadsheet, open Extensions → Apps Script. Under Services, add “Google Analytics Data API” (identifier AnalyticsData).
- Paste the report function. Paste the writeChannelReport function and set PROPERTY_ID to your GA4 property ID (Admin → Property details).
- Run it once. Run writeChannelReport from the editor and allow the permissions. A sheet called “GA4 channels” fills with the report.
- Create the trigger. Run createDailyTrigger once. From then on the report runs every day between 6:00 and 7:00 in the script’s time zone, with the spreadsheet closed.
Option 1: an Apps Script with a time-driven trigger
This is the free, do-it-yourself way. It uses Apps Script’s Analytics Data service and an installable time-driven trigger. The script below writes sessions and key events by channel for the last 28 days into a sheet called “GA4 channels”.
const PROPERTY_ID = '123456789' // GA4 Admin → Property details
function writeChannelReport() {
const report = AnalyticsData.Properties.runReport({
dimensions: [{ name: 'sessionDefaultChannelGroup' }],
metrics: [{ name: 'sessions' }, { name: 'keyEvents' }],
dateRanges: [{ startDate: '28daysAgo', endDate: 'yesterday' }],
orderBys: [{ metric: { metricName: 'sessions' }, desc: true }],
}, 'properties/' + PROPERTY_ID)
const header = [
...report.dimensionHeaders.map((h) => h.name),
...report.metricHeaders.map((h) => h.name),
]
const rows = (report.rows || []).map((r) => [
...r.dimensionValues.map((v) => v.value),
...r.metricValues.map((v) => Number(v.value)),
])
const ss = SpreadsheetApp.getActive()
const sheet = ss.getSheetByName('GA4 channels') || ss.insertSheet('GA4 channels')
sheet.clearContents()
sheet.getRange(1, 1, rows.length + 1, header.length).setValues([header, ...rows])
}
function createDailyTrigger() {
ScriptApp.newTrigger('writeChannelReport').timeBased().everyDays(1).atHour(6).create()
}
For a weekly report, replace the trigger line with .timeBased().onWeekDay(ScriptApp.WeekDay.MONDAY).atHour(6). Things to know:
- “yesterday”, not “today”. Today is still being collected, and GA4 keeps processing the last day or two. A daily run at 6:00 that ends yesterday is the stable choice.
- Relative dates move.
28daysAgois relative to the day the script runs, so the table always shows the last 28 days. - The trigger runs as you. If you lose access to the property, the run fails; Apps Script emails failure summaries to the trigger’s owner.
- Every report is code. A new dimension means editing the request; a second report means a second function.
Option 2: a connector with a refresh schedule
Google’s GA4 Reports Builder lists “scheduled reports” in its changelog (April 2024) without documenting the options. Paid connectors schedule refreshes from hourly to monthly; SyncWith also every 5 minutes. The connector comparison lists the schedules and prices each one states.
Option 3: AskGA4 scheduled refresh
In AskGA4 you ask the question once, save the report into its sheet, and set its refresh to daily or weekly (Pro). How it works, exactly as the add-on does it:
| When | One time-driven trigger per spreadsheet runs every day between 6:00 and 7:00 UTC. Daily reports run each time; weekly reports run when their last run is at least six and a half days old. |
|---|---|
| As whom | The person who scheduled the report, with their own Google login and GA4 access. The sheet can be closed. |
| What it writes | The same table in the same sheet, replacing the last run’s rows, with a note in A1 saying when it was refreshed and anything GA4 reported (an (other) row, thresholds, quota left). |
| Dates | Relative ranges such as “last 28 days” (28daysAgo → yesterday) move with each refresh; named periods such as “October 2026” stay fixed. |
| If it fails | The report in the sidebar shows the error. If Pro ends, scheduling is paused for that report with a message, instead of failing every day. |
| By hand | Any plan can refresh one report, or every report in the file from Extensions → AskGA4 → Refresh all reports in this file. |
Charts, pivot tables and formulas that point at the report’s sheet update with it, so a dashboard tab built on top of a scheduled report keeps itself current.
The AskGA4 add-on is waiting for its Google Workspace Marketplace listing. Until it is listed, the same question-to-report step runs in your browser at askga4.com/app: sign in with Google, pick the property, ask, then copy the table into Google Sheets or download it as CSV. Saving reports into a sheet and scheduled refresh are part of the add-on. Free: 5 saved reports and 30 questions a month, refreshed by hand. Pro adds daily or weekly scheduled refresh, comparisons of up to 4 date ranges with a change column, and up to 200 saved reports (prices).
Questions
Can GA4 send data to Google Sheets automatically?
Not by itself: GA4’s Export to Google Sheets is a one-off snapshot. Something has to run the report on a timer: an Apps Script trigger, a connector with a schedule, or AskGA4 Pro’s daily or weekly refresh.
How often can a scheduled GA4 report refresh in Sheets?
Apps Script triggers run from every minute to once a month for your own scripts, but add-ons may use a time-driven trigger at most once per hour. AskGA4 refreshes daily or weekly. Some paid connectors offer hourly refresh.
Does the spreadsheet have to be open for the refresh?
No. Time-driven triggers run on Google’s servers with the sheet closed, for Apps Script and for AskGA4’s scheduled refresh.
Why should a daily report end yesterday instead of today?
Today is still being collected, and GA4 keeps processing data for a day or two. A report that ends yesterday is complete and matches GA4’s own “last 28 days”.
What happens to a scheduled AskGA4 report if Pro ends?
The next scheduled run pauses that report’s schedule and shows a message in the sidebar. The table stays in the sheet, and you can still refresh it by hand.
Who owns the scheduled refresh when a team shares a sheet?
The person who scheduled it: the refresh runs with their Google login and GA4 access. If they lose access to the property, the refresh fails until someone else saves and schedules the report.
Related guides
- How to get GA4 data into Google Sheets: Five ways to get GA4 numbers into a sheet, from a one-off export to a report that refreshes itself, with steps for each.
- GA4 traffic by channel and source / medium in Google Sheets: A worked example: sessions and key events by channel and by source / medium, with the GA4 fields, the request and a comparison table.
- GA4 to Google Sheets connectors compared: Seven GA4-to-Sheets add-ons side by side: free plan, lowest price, refresh schedules, other data sources and how a report is built, each sourced from the product’s own pages.
- GA4 reports in Google Sheets, explained: dimensions, metrics, date ranges, comparisons, thresholds and quotas.
Sascha Heyer builds AskGA4 and learnga4sql.com, a SQL trainer for GA4’s BigQuery export. Questions or corrections: hello@askga4.com.