Real fixes from seven live sites. No pitch.Log in / My reports
Idea to Traffic Pressure Test

How to Identify Google Search Traffic in Your Analytics and Logs

Google Search traffic is identified by the HTTP Referer header, which holds only the Google host, such as https://www.google.com/ or a local domain like https://www.google.co.uk/, with no path or keyword. The Google app on Android can also send android-app://com.google.android.googlequicksearchbox/https/www.google.com. Count only page requests with those values, and expect the total to be lower than Search Console clicks.

On November 12, 2026, Google added a new page to its Search Central documentation titled "Identify Google Search traffic in your web analytics or server logs." It sounds basic, but it settles a question new site owners argue about constantly: when a visit shows up in your stats, how do you know it actually came from a Google search result? The short version is that you look at one HTTP header, the Referer, and you only expect to see the Google host name in it, never the search terms. This post turns that doc into steps you can run today in GA4, in raw server logs, and on a Cloudflare Pages site that has no logs at all.

What Google actually sends when someone clicks your result

When a person clicks a link on a Google results page, their browser requests your page and usually includes a Referer header naming the page they came from. Google Search uses the origin referrer policy, which means the header carries only the scheme and host. There is no path and no query string, so the keyword the person typed is never in it. For keywords, Google points you to the Performance report in Search Console, which is the only place that data lives.

Here is what the doc says each surface sends:

  • Google Search on the web: https://www.google.com/, or a local domain such as https://www.google.co.uk/ or https://www.google.co.jp/.
  • Google app on Android: android-app://com.google.android.googlequicksearchbox/https/www.google.com when the app opens your link in a browser tab. In other cases it sends the normal web value above.
  • Google app on iOS: the normal web value, https://www.google.com/ or a local domain.
  • Discover: the same value as whichever surface the person was using, the Google app or Google Search on the web.
  • Google Images and other Google services on the same origins: the same values, so they are counted when you match these patterns.

Two things follow from that list. First, you cannot separate classic web results from Discover or Images using the Referer alone, because they share the same host. Second, the doc says nothing about AI Mode, AI Overviews, Google News or Gemini, so do not assume a special referer exists for any of them. If you need to split by search appearance, Search Console's Performance report is still the tool.

How to check Google Search traffic in GA4

Most analytics tools already read the Referer and classify these values as organic Google traffic, so in GA4 you rarely need to do anything special. To confirm what you are getting:

  1. Open Reports > Acquisition > Traffic acquisition.
  2. Change the primary dimension to Session source / medium. Google Search visits appear as google / organic.
  3. Add a secondary dimension of Landing page + query string to see which pages people arrive on from search.
  4. Set the date range to the last 28 days so it lines up with the default Search Console view.

If google / organic looks suspiciously small, check your own setup before blaming Google. The doc warns that custom channel group rules, referral exclusions and filters can reclassify Google traffic. A common one: someone adds google.com to Admin > Data streams > your stream > Configure tag settings > List unwanted referrals while trying to fix a payment gateway issue, and real search visits get folded into another channel. Open that list and make sure no Google domain is there unless you know exactly why.

A second check is a free-form Exploration with the Page referrer dimension and the Sessions metric. You should see https://www.google.com/ and local domains near the top for a site that gets any search traffic. Seeing long Google URLs with paths there usually means the visit came through another Google product, not a search results page.

How to count it in raw server logs

If you run your own server or a host that gives you access logs, you can count search landings without any JavaScript, ad blockers or consent banners getting in the way. The important rule from the doc: count only landing page requests. When a page loads its CSS, images and scripts, those subresource requests carry your own page as the Referer, and an image loaded on a Google page can carry Google's. If you count every line with a Google referer you will inflate the numbers.

For an Nginx or Apache log in the standard combined format, this one-liner prints the pages people landed on from Google Search, counted and sorted, and ignores everything that is not an HTML page:

awk -F'"' '($4 ~ /^https:\/\/www\.google\.[a-z.]+\/$/ || $4 ~ /^android-app:\/\/com\.google\.android\.googlequicksearchbox/) && $2 ~ /^GET [^ ]*(\/|\.html)([?][^ ]*)? / {split($2, r, " "); print r[2]}' access.log | sort | uniq -c | sort -rn | head -20

It splits each line on double quotes, so field 2 is the request line and field 4 is the Referer. The first test matches any Google host with only a slash after it, which covers google.com, google.co.uk, google.com.au and the rest. The second test catches the Android app value. The last test keeps only requests for paths ending in a slash or .html. If your pages use other URL patterns, adjust that part. Run it on yesterday's rotated log, for example access.log.1, to get a clean full day.

If your site is on Cloudflare Pages

Static sites on Cloudflare Pages do not get downloadable access logs, so you have two practical options.

Option 1, no code: turn on Cloudflare Web Analytics for the Pages project (in the project, open Metrics and enable Web Analytics). Its dashboard has a Referer breakdown, and Google hosts show up there. It is privacy first and does not set cookies, but it relies on a small script, so blocked scripts still drop visits.

Option 2, a tiny Pages Function: add a file at functions/_middleware.js that logs only Google Search landings on HTML pages:

export async function onRequest(context) {
  const ref = context.request.headers.get("Referer") || "";
  const url = new URL(context.request.url);
  const isPage = url.pathname.endsWith("/") || url.pathname.endsWith(".html");
  const fromGoogle = /^https:\/\/www\.google\.[a-z.]+\/$/.test(ref) ||
    ref.startsWith("android-app://com.google.android.googlequicksearchbox");
  if (isPage && fromGoogle) {
    console.log(JSON.stringify({ google: ref, page: url.pathname }));
  }
  return context.next();
}

Deploy it, then watch the lines arrive with npx wrangler pages deployment tail --project-name=your-project. One cost to know before you ship it: a middleware file makes every request run a Function, and Functions requests count against the Workers free plan limit of 100,000 requests per day. A small site will not get near that, but if you serve a lot of images, use a _routes.json file to exclude static folders so only page requests invoke the Function.

Why your analytics will not match Search Console

Expect analytics to show fewer Google visits than Search Console shows clicks. The doc lists the reasons, and none of them mean something is broken:

  • Privacy settings, browser extensions, ad blockers and consent choices stop the analytics tag or strip the Referer. Private browsing and anti-fingerprinting features can send a blank Referer.
  • Some browsers send no Referer when a result opens in a new tab, and moving from a native widget to an external browser can drop it too.
  • Client-side or meta refresh redirects replace the original Referer with your own URL. A redirect that sets a stricter Referrer-Policy can remove it entirely.
  • Redirects that drop the query string also drop tracking parameters such as gclid.
  • Search Console counts the click on Google. Analytics counts only after your page loads and the tag fires, so anyone who bounces before that is missing.
  • Search Console excludes Google Ads clicks, which your analytics may include if you run ads.

So do not try to make the two numbers equal. Track the gap instead. Pick five of your landing pages, write down Search Console clicks and GA4 google / organic sessions for the same 28 days, and repeat monthly. A steady gap is normal. A gap that suddenly widens after a site change usually points to a new redirect, a consent banner, or a tag that stopped firing on some templates.

A 10 minute checklist for today

  1. Confirm your pages load without a JavaScript or meta refresh redirect. Use server-side 301s only.
  2. Check that no redirect on your site sends Referrer-Policy: no-referrer. Run curl -sI https://yoursite.com/old-page | grep -i -E "location|referrer-policy" on any redirected URL.
  3. Open GA4's unwanted referrals list and remove any Google domain you did not add on purpose.
  4. Compare Search Console clicks against GA4 google / organic sessions for your top five pages and note the gap.
  5. If you have logs, run the awk command above once a week and keep the output.

If you want a quick look at whether your redirects, canonical tags and analytics setup are sound before you start measuring, the free site checker runs 30 structural checks on any URL in about ten seconds.

Where this question came from

Questions about spotting Google Search visits

Does the Google referer include the search keyword?

No. Google Search uses the origin referrer policy, so the Referer header only contains the scheme and host, such as https://www.google.com/. Keywords are only available in the Search Console Performance report.

Can I tell Discover traffic apart from search results using the referer?

Not with the Referer alone. Google says Discover sends the same value as the surface it was viewed on, the Google app or Google Search on the web, so the two look identical. Use Search Console's separate Discover report instead.

Why does some Google traffic show as direct in my analytics?

The Referer can be blank because of private browsing, anti-fingerprinting features, privacy extensions, some browsers opening results in a new tab, or a redirect that removes it. Those visits have no source to read, so tools label them direct.

What referer does the Google app on Android send?

When the app opens your link in a browser tab it sends android-app://com.google.android.googlequicksearchbox/https/www.google.com. Otherwise it sends the normal web value, https://www.google.com/ or a local Google domain.