Sub topic 6
Reading CTR, impressions and position by cohort
This chapter shows how to read click-through rate (CTR), impressions and average position for your exposed and comparison query cohorts, and how to avoid the common mistakes in doing so. It assumes you have already built the two cohorts and have a DataFrame of Search Console rows with cohort and period columns. It also assumes you know pandas groupby and the basic definitions of clicks, impressions, CTR and position.
The three metrics tell different stories
AI Overviews can change what users do on the results page without changing where your page ranks. A page can stay at position 3 and still lose clicks, because the answer now appears above it. Each metric points to a different cause, so read them together.
| Metric | What it measures | What a change suggests |
|---|---|---|
| Impressions | How often a result of yours was shown | Demand changed, visibility changed, or tracking changed |
| Position | Impression-weighted average rank of your results | Ranking changed, or the mix of queries changed |
| CTR | Clicks divided by impressions | Behavior on the results page changed |
The pattern you are looking for is a fall in CTR in the exposed cohort, with a flat position and stable impressions. The comparison cohort should not show the same fall. If position also moved, you cannot credit the CTR change to AI Overviews alone.
Aggregate by summing, never by averaging
The most common error is averaging the ctr column from the API. Each row has a different number of impressions, so a row with 10 impressions would count as much as a row with 100,000. Sum the clicks and impressions for each group, then divide.
Position needs the same care. The API reports an average position for each row. To combine rows, weight each position by its impressions.
import pandas as pd
def cohort_summary(df: pd.DataFrame) -> pd.DataFrame:
"""Return clicks, impressions, CTR and weighted position per cohort and period."""
d = df.assign(pos_x_impr=df["position"] * df["impressions"])
g = d.groupby(["cohort", "period"])[["clicks", "impressions", "pos_x_impr"]].sum()
g["ctr"] = g["clicks"] / g["impressions"]
g["position"] = g["pos_x_impr"] / g["impressions"]
return g.drop(columns="pos_x_impr")
rows = [
{"cohort": "exposed", "period": "pre", "clicks": 800, "impressions": 20000, "position": 3.0},
{"cohort": "exposed", "period": "pre", "clicks": 400, "impressions": 20000, "position": 5.0},
{"cohort": "exposed", "period": "post", "clicks": 600, "impressions": 21000, "position": 3.1},
{"cohort": "exposed", "period": "post", "clicks": 300, "impressions": 21000, "position": 5.1},
{"cohort": "comparison", "period": "pre", "clicks": 1000, "impressions": 15000, "position": 3.0},
{"cohort": "comparison", "period": "pre", "clicks": 500, "impressions": 15000, "position": 4.0},
{"cohort": "comparison", "period": "post", "clicks": 960, "impressions": 15250, "position": 3.0},
{"cohort": "comparison", "period": "post", "clicks": 490, "impressions": 15250, "position": 4.0},
]
summary = cohort_summary(pd.DataFrame(rows))
print(summary.round(4))
ctr = summary["ctr"]
exposed_change = ctr.loc[("exposed", "post")] - ctr.loc[("exposed", "pre")]
comparison_change = ctr.loc[("comparison", "post")] - ctr.loc[("comparison", "pre")]
print(f"Exposed CTR change: {exposed_change:+.4f}")
print(f"Comparison CTR change: {comparison_change:+.4f}")
print(f"Difference-in-differences: {exposed_change - comparison_change:+.4f}")The sample data is small and invented so you can check the arithmetic by hand. With real data, replace rows with the DataFrame you built from the API export.
| Cohort | Period | Clicks | Impressions | CTR | Weighted position |
|---|---|---|---|---|---|
| exposed | pre | 1200 | 40000 | 0.0300 | 4.0 |
| exposed | post | 900 | 42000 | 0.0214 | 4.1 |
| comparison | pre | 1500 | 30000 | 0.0500 | 3.5 |
| comparison | post | 1450 | 30500 | 0.0475 | 3.5 |
The exposed cohort lost about 0.86 percentage points of CTR. The comparison cohort lost about 0.25 points, which is probably the shared drift. The difference-in-differences is about -0.61 percentage points. Position barely moved in either cohort, so a ranking change is an unlikely explanation here.
Report absolute and relative change
A change of -0.61 points means little without a baseline. Report it both ways:
- Absolute change, in percentage points of CTR. This is what the difference-in-differences gives you.
- Relative change, as a share of the pre-period CTR. Here the exposed cohort fell 28.6% (0.0086 / 0.0300), and the comparison cohort fell 4.9%.
Use the absolute figure when you convert to clicks. Multiply it by post-period exposed impressions: 42,000 × 0.0061 is about 257 clicks lost in the window, relative to what the comparison trend would predict. Use the relative figure to compare cohorts that started from different CTR levels.
Impressions need careful reading
Impressions look like the safest number, but several things move them without any change in user demand.
- AI Overview links count as impressions. Search Console includes AI Overview appearances in its Web search totals and does not label them separately. A page cited in an overview can gain impressions that were never counted before, so rising impressions can coexist with falling CTR.
- Position inside an overview. Google documents that all links within one AI Overview share the same position. Do not read a position change as a normal ranking change when the data mixes both kinds of appearance.
- Reporting changes. Google has changed how impressions are counted in the past. A sudden step in impressions across both cohorts on one day is a sign of a reporting or tracking change.
- Demand shifts. If impressions rose or fell in both cohorts by the same amount, that is probably seasonality or news, not AI Overviews.
Position: weighted, and shaped by mix
Weighted average position is a summary of a distribution, and it can mislead in two ways.
First, a mix shift can move the average without any query changing rank. If the post period contains more impressions from a query that ranks at 9, the cohort average rises even though every query held its place. To guard against this, compare position for a fixed set of queries that appear in both periods.
Second, the average hides the spread. A cohort with half its impressions at position 1 and half at position 9 averages 5, which describes neither group. CTR depends strongly on rank, so bucket queries by position and compare CTR inside each bucket.
import pandas as pd
def ctr_by_position_bucket(df: pd.DataFrame) -> pd.DataFrame:
"""CTR per cohort, period and position bucket, using summed clicks and impressions."""
bins = [0, 3, 10, 20, float("inf")]
labels = ["1-3", "4-10", "11-20", "21+"]
d = df.assign(bucket=pd.cut(df["position"], bins=bins, labels=labels, right=True))
g = d.groupby(["cohort", "bucket", "period"], observed=True)[["clicks", "impressions"]].sum()
g["ctr"] = g["clicks"] / g["impressions"]
return g
demo = pd.DataFrame(
{
"cohort": ["exposed"] * 4,
"period": ["pre", "post", "pre", "post"],
"position": [2.0, 2.2, 6.0, 5.8],
"clicks": [900, 700, 300, 280],
"impressions": [10000, 10000, 12000, 12000],
}
)
print(ctr_by_position_bucket(demo))Bucketing is most informative at the top of the page. Overviews tend to push organic results down, so top-ranked results often show a larger CTR loss than lower ones. If your effect shows only in the 1-3 bucket, report it that way instead of as one blended number.
Common errors
- Averaging the CTR column. Always sum clicks and impressions first.
- Unweighted position. A plain mean of the position column overweights rare queries.
- Comparing unequal windows. If the pre period has 28 days and the post period has 35, compare rates, or use equal-length windows. Align weekdays too, since weekday and weekend CTR often differ.
- Reading small cohorts. A cohort with a few hundred impressions per period produces noisy CTR. Set a minimum impression threshold and report the cohort sizes beside every estimate.
- Ignoring anonymized queries. The API omits rare queries for privacy, so cohort totals will not match the page-level totals in the interface. Compare like with like and note the gap.
- Changing cohort definitions after seeing the result. Fix the cohort rules before you look at post-period CTR, or the result is tuned to the data.
What to record from this step
Before moving on, keep these outputs, since the reporting chapter will use them:
- A table of clicks, impressions, CTR and weighted position for each cohort and period.
- Absolute and relative CTR change for each cohort, and the difference-in-differences.
- A position check showing the change in weighted position per cohort, and the bucketed CTR if position differs.
- The cohort sizes and the minimum impression threshold you applied.
Exercise
An exposed cohort had 10,000 impressions and 500 clicks before the change, and 10,000 impressions and 400 clicks after. A comparison cohort had 8,000 impressions and 480 clicks before, and 8,000 impressions and 456 clicks after. Weighted position did not change in either cohort. What is the difference-in-differences in CTR, and why is it better to report it than the exposed change alone?
Show answer
Exposed CTR fell from 5.0% (500/10,000) to 4.0% (400/10,000), a change of -1.0 point. Comparison CTR fell from 6.0% (480/8,000) to 5.7% (456/8,000), a change of -0.3 points. The difference-in-differences is -1.0 - (-0.3) = -0.7 percentage points. The exposed change alone includes the drift that affected both cohorts, such as seasonality, so it overstates the effect. Subtracting the comparison change removes that shared drift.
Exercise
A colleague computes cohort CTR as the mean of the ctr column across all rows. Give the problem with this and the correct calculation.
Show answer
The mean gives every row equal weight regardless of impressions, so rows with very few impressions distort the result. The correct calculation is total clicks divided by total impressions for the cohort and period. Weighted position should likewise be the sum of position times impressions, divided by total impressions.