---
name: google-analytics-new-referral-sources
description: "Every Friday, the referring sites that sent sessions this week but none in the 90 days before, with the page they linked to and how engaged the visitors were. Use when the user asks for this, or when it runs on a schedule."
---

# GA4 new referral sources

Every Friday, the referring sites that sent sessions this week but none in the 90 days before, with the page they linked to and how engaged the visitors were.

A new referrer is some of the best news a site gets, and GA4 buries it. A forum thread, a newsletter mention or a chatbot answer citing your page shows up as one more row in Traffic acquisition, below sources that have been there for years.

The agent keeps a 90-day memory of who refers you and reports only the newcomers, with the referring URL when the browser passed one. SEO leads get link prospects; marketers find out which piece got shared, while the conversation is still going.

## Two ways to get the data

Use the API or MCP route when you have an MCP server, a CLI or an API token for the app. Otherwise, if you can drive a browser the user is signed in to (Claude in Chrome, a Playwright or Chrome DevTools MCP server), use the browser route. Say which one you used.

## Route A: API or MCP server

### What you need

- Viewer access to the GA4 property you want watched.
- Analytics Data API access for the agent: an Analytics MCP server, a connector, or a Google Cloud service account added under Property access management.

If something is missing, say what and stop; do not invent numbers.

### Steps

1. **Pull this week's referrers** (Google Analytics): Call `runReport` for the last 7 days with the dimensions `sessionSource` and `landingPagePlusQueryString`, the metrics `sessions` and `engagedSessions`, and a `dimensionFilter` with an `inListFilter` on `sessionMedium` for `referral` and `(not set)`. The second value catches tagged links from AI assistants, which often arrive without a medium.
2. **Check who referred before** (Google Analytics): Run one more report on `sessionSource` alone for the 90 days before this week, with the same filter. A source is new when it has sessions this week and none in that window.
3. **Filter out the noise**: Drop your own domains and subdomains, payment and login hosts (`checkout.stripe.com`, `accounts.google.com`), webmail and sources under 5 sessions. Payment hosts belong in the data stream's List unwanted referrals setting, so suggest adding them.
4. **Find the referring page** (Google Analytics): For each new source, run a report on `pageReferrer` with a `beginsWith` filter on that domain. Many sites send only their origin, so the full URL is a bonus, not a given.
5. **Report the newcomers**: One row per new source, biggest first: sessions, engaged sessions, the landing page and the referring URL when there is one. AI assistants such as `chatgpt.com` and `perplexity.ai` get their own line.

## Route B: the browser

### What you need

- Signed in to Google with the Viewer role on the GA4 property; Viewers can create explorations but not change the unwanted referrals list.

If something is missing, say what and stop; do not invent numbers.

### Steps

Start at https://analytics.google.com/analytics/web/. The user is signed in already; never type passwords or codes, and ask if a sign-in page appears.

1. **List this week's referrers**: Pick the property, go to Reports > Acquisition > Traffic acquisition and change the primary dimension to `Session source / medium`. Set the date range to `Last 7 days`, type `referral` in the table search box and add `Landing page + query string` as the secondary dimension. Also search for `(not set)`, where tagged links from AI assistants often land.
2. **Export the last 90 days for comparison**: Change the date range to a custom range from 97 days ago to 8 days ago, keep the search, set Rows per page to the maximum and use Share this report > Download file. Any source in this week's list that is missing from this file is new.
3. **Filter out the noise**: Drop your own domains, payment and login hosts (`checkout.stripe.com`, `accounts.google.com`), webmail and sources under 5 sessions. Payment hosts belong under Admin > Data streams > your stream > Configure tag settings > Show more > List unwanted referrals.
4. **Look for the referring page**: Open Explore > Blank, add the dimension `Page referrer` and the metric `Sessions` for the last 7 days, and filter `Page referrer` contains each new domain. Many sites pass only their origin, so a full URL is a bonus.
5. **Report the newcomers**: One row per new source, biggest first: sessions, engaged sessions (add the column in the exploration), landing page and referring URL when there is one. `chatgpt.com`, `perplexity.ai` and `gemini.google.com` get their own line.

Note: The 90-day comparison is a visual diff of two tables, so it is the slow part; a download of the 90-day table keeps it manageable. Browsers usually send only the referring origin, so the referring URL is often just the domain in the UI too.

## The report

- **New referring sites** this week, ordered by sessions.
- For each: sessions, engaged sessions, the landing page and the referring URL where it was passed.
- **AI assistants** (chatgpt.com, perplexity.ai, gemini.google.com) called out when they appear.
- A suggestion for the biggest one, for example "Answer the questions in the Hacker News thread while it is still active".

## Post it to Briefkin

When `BRIEFKIN_TOKEN` is set, or `~/.config/briefkin/env` exists (the installer from https://briefkin.dev/docs writes it), also send the result to the user's Briefkin board as one card. Keep the `item_key` the same on every run so the card updates in place, use a new `event_id` per run, and put today's real numbers in place of the example ones. If the request fails, say so once and carry on.

```bash
[ -n "${BRIEFKIN_TOKEN:-}" ] || . ~/.config/briefkin/env
curl -sS -X POST "${BRIEFKIN_URL:-https://briefkin.dev}/v1/events" \
  -H "authorization: Bearer $BRIEFKIN_TOKEN" \
  -H "content-type: application/json" \
  -d @- <<'JSON'
{
  "v": 1,
  "event_id": "google-analytics-new-referral-sources/<date of this run, e.g. 2026-10-16>",
  "item_key": "google-analytics-new-referral-sources",
  "project": "example.com",
  "source": "GA4 new referral sources skill",
  "kind": "update",
  "title": "4 sites sent visitors for the first time",
  "summary": "524 sessions came from four referrers that sent nothing in the previous 90 days. Most arrived from a single Hacker News thread about the late payments study.",
  "widget": [
    {
      "type": "Table",
      "props": {
        "columns": [
          "Source",
          "Sessions",
          "Engaged",
          "Landed on"
        ],
        "align": [
          "left",
          "right",
          "right",
          "left"
        ],
        "rows": [
          [
            "news.ycombinator.com",
            412,
            236,
            "/blog/late-payments-study"
          ],
          [
            "chatgpt.com",
            58,
            41,
            "/templates/invoice-pdf"
          ],
          [
            "g2.com",
            31,
            22,
            "/pricing"
          ],
          [
            "perplexity.ai",
            23,
            17,
            "/blog/net-30-payment-terms"
          ]
        ]
      }
    },
    {
      "type": "Badges",
      "props": {
        "items": [
          {
            "label": "AI assistants: 2",
            "tone": "info"
          },
          {
            "label": "Filtered out: 3 hosts",
            "tone": "neutral"
          }
        ]
      }
    }
  ]
}
JSON
```

Widgets come from the Briefkin catalog (https://briefkin.dev/v1/catalog). Without a token, just give the user the report.

## Run it on a schedule

Suggested: Fridays at 9:00 (`0 9 * * 5`). From cron, with the agent signed in on that machine:

```bash
0 9 * * 5 claude -p "Run the google-analytics-new-referral-sources skill"
# Codex: codex exec, Gemini CLI: gemini -p, Copilot CLI: copilot -p, OpenCode: opencode run
```

Or use the agent's own scheduler (Claude Code routines, Codex automations, Claude or ChatGPT scheduled tasks): https://briefkin.dev/skills/google-analytics-new-referral-sources#schedule

Source: https://briefkin.dev/skills/google-analytics-new-referral-sources
