Sub topic 10
Connecting search clicks to organic sessions
This chapter assumes you have a daily Search Console table (see the data model chapter) and can export organic landing page data from GA4. Basic SQL helps.
Why the two numbers differ
Search Console counts a click each time a user clicks your result in Google Search. GA4 counts a session when a visitor's page load is recorded by your tag. A click does not always become a session, and a session does not always come from a Google click.
Common reasons the counts differ:
- Visitors who decline cookie consent, or who block scripts, never reach GA4.
- Users who leave before the page loads send no GA4 hit.
- GA4 "Organic Search" includes Bing, DuckDuckGo and other engines. Search Console covers Google only.
- Several clicks from one user within 30 minutes can form a single session.
- Search Console dates use Pacific time. GA4 uses your property's time zone.
- Redirects and tracking parameters can change the landing page URL that GA4 records.
Expect the two to move together, not match exactly. Track the ratio of sessions to clicks over time. A sudden change in that ratio points to a tracking or redirect problem. A change in clicks alone points to a search change.
Choosing the join key
Search Console reports queries, and GA4 does not. GA4 reports sessions, and Search Console does not. The only shared fields are the date and the landing page. So you can join at the page and day level. You cannot attach sessions to individual queries.
Before joining, make the page values match:
- Search Console returns full URLs. GA4's landing page is usually a path.
- Remove query strings and fragments from both sides.
- Apply the same trailing-slash and lowercase rules to both.
- Aggregate each side to one row per date and page before joining.
Joining the tables in SQL
The query below assumes a gsc_daily table and a ga4_organic table with columns date, landing_page and sessions. It uses PostgreSQL syntax.
WITH gsc AS (
SELECT
date,
REGEXP_REPLACE(REGEXP_REPLACE(page, '^https?://[^/]+', ''), '[?#].*$', '') AS landing_page,
SUM(clicks) AS clicks,
SUM(impressions) AS impressions
FROM gsc_daily
GROUP BY 1, 2
),
ga AS (
SELECT date, landing_page, SUM(sessions) AS sessions
FROM ga4_organic
GROUP BY 1, 2
)
SELECT
COALESCE(gsc.date, ga.date) AS date,
COALESCE(gsc.landing_page, ga.landing_page) AS landing_page,
gsc.clicks,
ga.sessions,
ga.sessions::numeric / NULLIF(gsc.clicks, 0) AS sessions_per_click
FROM gsc
FULL OUTER JOIN ga
ON gsc.date = ga.date
AND gsc.landing_page = ga.landing_page
ORDER BY date, landing_page;The FULL OUTER JOIN keeps rows that appear on only one side. Those rows are useful. A page with sessions and no clicks may receive Bing traffic. A page with clicks and no sessions may have a broken tag or a redirect.
Reading the result
Roll the result up by page group or by week before you judge it. Single days are noisy, and small pages produce unstable ratios.
| Pattern | Likely cause |
|---|---|
| Clicks and sessions fall together | Real change in search demand or rankings |
| Clicks steady, sessions fall | Tracking, consent or redirect problem |
| Sessions rise, clicks steady | Other search engines or a campaign tagged as organic |
| Ratio differs sharply between pages | URL normalization mismatch for some pages |
Exercise
Search Console shows 1,000 clicks to a page this week, and GA4 shows 1,300 organic sessions to the same page. Name two likely reasons that do not involve an error.
Show answer
GA4's Organic Search channel includes engines other than Google, such as Bing. Search Console counts only Google clicks. Also, one click can lead to later visits that start new sessions, for example after the 30-minute session timeout, and these may be attributed to organic search again.