Skip to content

Weekly

Track visits from AI chatbots

Each week you see how many sessions came from AI chatbots such as ChatGPT, Claude and Perplexity, by source, with the change from last week.

Runs
Weekly
Apps
Google Analytics
AI
Not needed
Access
analytics.readonly

Send this to your assistant

Create a ClickRuntime automation: every Monday, email me how many GA4 sessions came from AI chatbots like ChatGPT, Claude, Perplexity and Gemini last week, by source, compared with the week before.

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 content marketing lead at a software review site starts hearing that readers found them through AI chatbot answers. In Google Analytics 4 those visits are scattered across sources like chatgpt.com, perplexity.ai and claude.ai, mixed in with referral noise. Nobody has a clean number, so the team cannot say whether AI assistants are a growing channel or a rounding error, and budget talks run on anecdotes.

Each week, ClickRuntime runs a GA4 report on session source, keeps only the known AI chatbot domains, and compares the totals with the prior week. The email lists visits per assistant and the change since last time, so the trend is visible without building a custom exploration.

Publishers and documentation teams use it to see whether their pages are being cited in AI answers and how much traffic follows.

What you get out of it

  • A real number for a fuzzy channel

    Instead of anecdotes, you see how many sessions arrived from each assistant. That turns an argument about whether AI search matters into a figure you can put in a quarterly deck.

  • Growth or decline is visible early

    Comparing each week with the one before shows whether visits from chatbots are rising or falling. A steady climb is an early signal worth investing editorial time in before competitors notice.

  • Content that gets cited becomes clear

    When a new guide is followed by a jump in referrals, you learn what kind of page AI answers link to. That guides what you write next, based on observed behavior and not on guesswork.

  • Separate from normal referrals

    AI domains get their own lines, so they are not buried in a long list of referring sites. Reports to leadership can name the channel, which supports requests for budget or headcount.

  • No manual GA4 filtering

    Building the same source filter each week is easy to get wrong. A saved, repeatable query means this week's number is measured exactly like last week's, so comparisons stay honest.

How it works

What happens, step by step

  1. Every week, ClickRuntime asks Google Analytics how many visits came from AI chatbots such as ChatGPT, Claude, Perplexity, Gemini and Copilot.

  2. It compares each source with the week before.

  3. You get an email with the total in the subject and a line per chatbot, such as "chatgpt.com: 488 sessions (+71)".

Before it runs live

  • Connect Google Analytics

What you get

RunsWeekly
Track visits from AI chatbotstoday, 9:00Succeeded
Email · AI chatbot traffic: 642 sessionschatgpt.com: 488 sessions (+71) perplexity.ai: 96 sessions (+12) claude.ai: 58 sessions (+20)

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.
ai_chatbot_referral_traffic_report.pyexample
from clickruntime import on_trigger, credentials, http, notify

PROPERTY = "123456789"
AI_SOURCES = ["chatgpt.com", "chat.openai.com", "claude.ai", "perplexity.ai", "gemini.google.com", "copilot.microsoft.com"]

@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": "7daysAgo", "endDate": "yesterday", "name": "this"},
                             {"startDate": "14daysAgo", "endDate": "8daysAgo", "name": "last"}],
              "dimensions": [{"name": "sessionSource"}], "metrics": [{"name": "sessions"}],
              "dimensionFilter": {"filter": {"fieldName": "sessionSource", "inListFilter": {"values": AI_SOURCES}}}},
    ).json().get("rows", [])
    data = {}
    for r in rows:
        data.setdefault(r["dimensionValues"][0]["value"], {})[r["dimensionValues"][1]["value"]] = int(r["metricValues"][0]["value"])
    lines = [f"{src}: {d.get('this', 0)} sessions ({d.get('this', 0) - d.get('last', 0):+})" for src, d in sorted(data.items())]
    total = sum(d.get("this", 0) for d in data.values())
    notify.email_me(f"AI chatbot traffic: {total} sessions", "\n".join(lines) or "No sessions from AI chatbots.")
    return {"sessions": total}

FAQ

Common questions

Which AI domains are counted?
The list covers the common assistants such as ChatGPT, Perplexity, Claude and Gemini, matched by their referring domains in the session source. New assistants appear over time, so you can ask for extra domains to be added whenever you notice another one in your referral list.
Will it catch visits that show up as direct traffic?
Not always. Some assistants and apps strip referrer information, so those visits land in direct traffic and cannot be separated in GA4. The report counts what is identifiable by source, so treat it as a floor rather than the full total.
Do I need special permissions in Google Analytics?
The connected Google login needs at least viewer access to the GA4 property, since the query only reads report data. It does not change any settings, filters or tags in your property, and you can point it at one property or several.
What permissions does it need?
analytics.readonly. 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 (weekly). 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 “Track visits from AI chatbots” from your assistant

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