Skip to content

Daily

Hear when yesterday's traffic falls short

You get an email only on days when sessions dropped well below the recent average.

Runs
Daily
Apps
Google Analytics
AI
Not needed
Access
read

Send this to your assistant

Create a ClickRuntime automation: every morning at 7am, email me if yesterday's GA4 sessions were more than 30% below the 7-day average.

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

A bakery's website takes online orders, and one Tuesday a plugin update accidentally adds a noindex tag to the homepage. Search traffic falls off a cliff over two days. Orders slow, but it feels like an ordinary quiet week, and no one thinks to open Google Analytics until the following Monday, by which time rankings have started to disappear as well. The cost is lost orders nobody connects to the cause.

Every day, ClickRuntime pulls GA4 sessions for the last eight days by date, compares yesterday with the average of the previous seven and sends an alert if yesterday came in well below normal. On healthy days, nothing arrives, so the alert stays meaningful when it does.

Web agencies attach it to client sites as a cheap early warning, and in-house teams run it on high-stakes pages.

What you get out of it

  • Technical accidents caught within a day

    Noindex tags, broken redirects and failed deploys all show up as traffic falling. An alert the next morning gives you a chance to roll back before search engines drop pages from the index.

  • Less checking, more working

    Rather than opening analytics out of anxiety, you rely on a signal that only fires when something is off. That trades daily vigilance for a single, trustworthy notice. You also stop second-guessing yourself on quiet days, because the alert only fires when the data says so.

  • Protects revenue on order-driven sites

    For shops and booking sites, traffic is the front end of sales. Learning about a sharp fall quickly means fewer lost orders and fewer awkward explanations at month end. A fast alert pays for itself the first time it prevents a lost weekend of orders.

  • Useful for agencies with many clients

    Nobody can watch thirty sites by hand. An alert names the one that fell, so the agency contacts the client with the problem identified instead of the client calling to ask what happened.

  • Separates real drops from normal wobble

    Comparing with a seven-day average smooths ordinary daily variation. Weekends and one-off dips do not trigger noise, while a true fall stands out clearly enough to deserve attention. That keeps the alert rare, so people take it seriously.

How it works

What happens, step by step

  1. Every day, ClickRuntime pulls the last eight days of sessions from Google Analytics.

  2. It compares yesterday with the average of the seven days before.

  3. Only if yesterday fell well below that average do you get an email, such as "1,240 sessions vs a 7-day average of 3,180 (-61%)". On normal days nothing is sent.

Before it runs live

  • Connect Google Analytics

What you get

RunsDaily
Hear when yesterday's traffic falls shorttoday, 9:00Succeeded
Email · Traffic dropped yesterday1,240 sessions vs a 7-day average of 3,180 (-61%).

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
  • Add an AI step, for example to summarize, sort or draft a reply
  • Add another app, for example also send it to Slack
  • Combine it with other Google Analytics 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.
daily_traffic_drop_alert.pyexample
from clickruntime import on_trigger, credentials, http, notify

PROPERTY = "123456789"
DROP = 0.6  # alert below 60% of the 7-day average

@on_trigger
def run(event):
    rows = http.post(f"https://analyticsdata.googleapis.com/v1beta/properties/{PROPERTY}:runReport",
        headers={"Authorization": f"Bearer {credentials.connection('google', 'work')}"},
        json={"dateRanges": [{"startDate": "8daysAgo", "endDate": "yesterday"}], "dimensions": [{"name": "date"}],
              "metrics": [{"name": "sessions"}], "orderBys": [{"dimension": {"dimensionName": "date"}}]},
    ).json().get("rows", [])
    values = [int(r["metricValues"][0]["value"]) for r in rows]
    if len(values) < 2:
        return {"skipped": "not enough data"}
    yesterday, avg = values[-1], sum(values[:-1]) / len(values[:-1])
    if yesterday < avg * DROP:
        notify.email_me("Traffic dropped yesterday", f"{yesterday:,} sessions vs a 7-day average of {avg:,.0f} ({yesterday / avg - 1:.0%}).")
    return {"yesterday": yesterday, "average": round(avg)}

FAQ

Common questions

How low does traffic need to be to trigger the alert?
You pick the percentage. Many people start at 30 or 40 percent below the seven-day average. Sites with big weekday and weekend differences can use a higher threshold or compare against the same weekday to avoid alerts every Sunday.
Does it work for a single section of the site?
Yes. The report can be filtered to a page path, such as /shop, or to a channel like organic search. Watching organic search alone is a popular choice, because that is where indexing mistakes show up first.
What if my site has very little traffic?
On sites with only a few dozen sessions a day, percentages swing wildly. A minimum session count before alerting helps, or you can compare weekly instead of daily so one quiet day does not look like an emergency.
What permissions does it need?
read. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run each time it runs (daily). 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 “Hear when yesterday's traffic falls short” from your assistant

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