On a schedule
Log your weekly website numbers to a sheet
Every week your key GA4 numbers are added as a row in your reporting sheet, and you get an email summarising what changed.
- Runs
- On a schedule
- Apps
- Google Analytics, Google Sheets
- AI
- Yes, uses the built-in AI allowance
- Access
- GA4 Viewer; Sheets write
Send this to your assistant
Create a ClickRuntime automation: every Monday, add a row to my Website Metrics sheet with last week's users, sessions, engagement rate and conversions from GA4. Compare with the previous rows and email me a short AI summary of the changes.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A marketing manager reports website numbers to the board every month from a Google Sheet. Each Monday they log into GA4, copy four numbers into the sheet and hope they used the same date range as last time. Some weeks get missed.
Writing the numbers automatically gives a complete, consistent history that charts and board reports can rely on, and a short summary tells the manager whether anything needs attention.
What you get out of it
A complete history
One row per week, every week, so trends and charts are trustworthy.
Consistent numbers
The same date ranges and metrics every time, so weeks can be compared fairly.
Ready for reporting
Board and client reports can pull straight from the sheet.
A short summary of changes
An email explains how this week compares with recent weeks.
How it works
What happens, step by step
Every Monday, ClickRuntime asks Google Analytics for last week's users, sessions, engagement rate and conversions.
It adds them as a new row in your Website Metrics sheet.
It reads the last few rows to compare this week with recent weeks.
AI writes a short summary of what changed and it is emailed to you.
Before it runs live
- Connect Google Analytics
- Connect your Google Sheets account and pick the spreadsheets it may use
What you get
Build your own
Need it to work differently?
Your own rules
Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.
Any number of apps
One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.
AI where it helps
Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.
On a schedule or on each event
Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.
Changes you can ask for
- Run it at a different time, more or less often, or only on weekdays
- Change what the AI looks for, or how it writes the result
- Add another app, for example also send it to Slack
- Combine it with other Google Analytics and Google Sheets steps into one automation
Under the hood
The code that runs this automation
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from datetime import date, timedelta
from clickruntime import on_trigger, http, credentials, ai, notify
def api(name, version):
return build(name, version, credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
PROPERTY = "123456789"
def ga(body):
url = f"https://analyticsdata.googleapis.com/v1beta/properties/{PROPERTY}:runReport"
return http.post(url, headers={"Authorization": f"Bearer {credentials.connection('google', 'work')}"}, json=body).json().get("rows", [])
SHEET_ID = "your-spreadsheet-id"
METRICS = ["totalUsers", "sessions", "engagementRate", "conversions"]
@on_trigger
def run(event):
r = ga({"dateRanges": [{"startDate": "7daysAgo", "endDate": "yesterday"}], "metrics": [{"name": m} for m in METRICS]})
values = [round(float(v["value"]), 3) for v in r[0]["metricValues"]] if r else [0] * len(METRICS)
week = (date.today() - timedelta(days=7)).isoformat()
sheet = api("sheets", "v4").spreadsheets().values()
sheet.append(spreadsheetId=SHEET_ID, range="Website Metrics!A:E", valueInputOption="RAW", body={"values": [[week] + values]}).execute()
history = sheet.get(spreadsheetId=SHEET_ID, range="Website Metrics!A1:E").execute().get("values", [])[-9:]
summary = ai.generate("\n".join(", ".join(map(str, row)) for row in history),
system="These are weekly website metrics (week, users, sessions, engagement rate, conversions). "
"In 4 sentences, explain how the latest week compares with recent weeks.", max_output_tokens=200).text
notify.email_me(f"Website metrics logged for week of {week}", summary)
return {"logged": week}FAQ
Common questions
Which numbers go in the row?
Can it log monthly instead?
Can I fill in past weeks?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Write a monthly search traffic report to a sheet
Each month, organic search traffic by landing page is written to a sheet with the change from the month before, and you get an email listing the best opportunities.
See how it worksLog daily website KPIs and get alerted when one drops
Every day yesterday's key numbers go into a sheet, and you are alerted in Slack and by email if any falls well below its recent average.
See how it worksLog daily GA4 traffic by source to Google Sheets
Each morning yesterday's GA4 sessions, users and key events per source / medium are appended to a Traffic tab.
See how it worksKeep exploring
Set up “Log your weekly website numbers to a sheet” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.