Skip to content

On a schedule

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.

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: on the 1st of every month, write last month's organic search sessions and conversions per landing page from GA4 to a new tab in my SEO sheet, with the change from the previous month. Have AI list the top 5 opportunities and email them to me.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

An agency reports search performance to a dozen clients each month. Every report starts with the same GA4 exploration, exported and pasted into a sheet, before anyone can start on the analysis the client actually pays for.

Writing the month's landing page data straight into a sheet, with a first list of opportunities, means the team starts each report at the interesting part.

What you get out of it

  • The groundwork is done

    Each month's data is in the sheet on the 1st, ready to analyse.

  • Month-on-month at a glance

    Every page shows its change from the previous month, so winners and losers stand out.

  • Opportunities to start from

    AI points out pages with traffic but few conversions, or pages that are slipping, as a first list to review.

  • A tab per month

    Past months stay in their own tabs for comparison and client history.

How it works

What happens, step by step

  1. On the 1st of each month, ClickRuntime asks Google Analytics for organic search sessions and conversions by landing page for the last two months.

  2. It works out each page's change from the month before.

  3. The table is written to a new tab in your SEO sheet.

  4. AI reviews the table and picks out the top opportunities, which are 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

RunsOn a schedule
Write a monthly search traffic report to a sheettoday, 9:00Succeeded
Email · SEO report ready1. /guides/inventory-counts: +620 sessions but 2 sign-ups. Add a clear trial link above the fold. 2. /blog/acme-vs-northwind lost 38%. Refresh the 2025 pricing table.

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • 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

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
seo_performance_report_in_sheets.pyexample
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from datetime import date
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"
ORGANIC = {"filter": {"fieldName": "sessionDefaultChannelGroup", "stringFilter": {"value": "Organic Search"}}}

@on_trigger
def run(event):
    rows = ga({"dateRanges": [{"startDate": "30daysAgo", "endDate": "yesterday"}, {"startDate": "60daysAgo", "endDate": "31daysAgo"}],
               "dimensions": [{"name": "landingPage"}], "metrics": [{"name": "sessions"}, {"name": "conversions"}], "dimensionFilter": ORGANIC, "limit": 1000})
    pages = {}
    for r in rows:
        pages.setdefault(r["dimensionValues"][0]["value"], {})[r["dimensionValues"][1]["value"]] = [int(r["metricValues"][0]["value"]), float(r["metricValues"][1]["value"])]
    table = [[p, *v.get("date_range_0", [0, 0]), v.get("date_range_0", [0])[0] - v.get("date_range_1", [0])[0]] for p, v in pages.items()]
    table.sort(key=lambda x: -x[1])
    tab = f"SEO {date.today():%Y-%m}"
    sheets = api("sheets", "v4").spreadsheets()
    sheets.batchUpdate(spreadsheetId=SHEET_ID, body={"requests": [{"addSheet": {"properties": {"title": tab}}}]}).execute()
    sheets.values().update(spreadsheetId=SHEET_ID, range=f"{tab}!A1", valueInputOption="RAW",
                           body={"values": [["Landing page", "Sessions", "Conversions", "Change"]] + table}).execute()
    ideas = ai.generate("\n".join(f"{r[0]} | {r[1]} | {r[2]} | {r[3]:+d}" for r in table[:150]), system="These are organic landing pages "
                        "(page | sessions | conversions | change). List the top 5 SEO opportunities with one action each.", max_output_tokens=500).text
    notify.email_me(f"SEO report ready: {tab}", ideas)
    return {"pages": len(table)}

FAQ

Common questions

Does it include keywords?
GA4 has no search keyword data. Add Google Search Console if you want queries and rankings too.
Can it run for several clients?
Yes. Set up one automation per client, each with its own GA4 property and sheet.
What counts as an opportunity?
By default: pages with rising traffic but low conversions, and pages losing traffic. You can describe your own rules.
What permissions does it need?
GA4 Viewer; Sheets write. Nothing else in your accounts is used.
Does it need AI?
Yes. It uses ClickRuntime's built-in AI, so you don't need an OpenAI or Anthropic key. Every plan includes a monthly AI allowance.
How many runs does it use?
One run each time it runs (on a schedule). Checks that find nothing to do and stop right away aren't counted.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Write a monthly search traffic report to a sheet” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.