Sub topic 5
Splitting Results by Segment
This chapter assumes you can compute CTR, conversion rate, CPA, and ROAS from campaign totals, as covered in the previous chapter. It also assumes you are comfortable reading a spreadsheet or a short Python script.
Why totals hide the story
A campaign total is an average across everyone you reached. Averages blend strong and weak groups into one number, so a campaign that looks "fine" overall can contain a profitable segment and a money-losing one that cancel each other out.
A segment is a group of people or impressions that share a trait, such as device, channel, audience, creative, region, or new versus returning visitor. Splitting by segment means recomputing the same core metrics for each group and comparing them.
Choosing useful dimensions
Pick dimensions you can act on. A segment is useful when you could change budget, targeting, creative, or the landing page for it.
| Dimension | Example values | What you could change |
|---|---|---|
| Channel | search, social, email | Budget split |
| Device | mobile, desktop | Landing page layout |
| Audience | lookalike, retargeting | Targeting |
| Creative | headline A, headline B | Ad copy |
| Visitor type | new, returning | Offer and message |
Start with two or three dimensions tied to your goal. Splitting by everything produces tiny groups and noisy numbers.
Computing metrics per segment
Reuse the same formulas for every segment. The code below extends the summary function and applies it to rows grouped by device.
def summarize(spend, impressions, clicks, conversions, revenue):
return {
"ctr": clicks / impressions,
"cvr": conversions / clicks,
"cpa": spend / conversions,
"roas": revenue / spend,
}
segments = {
"mobile": dict(spend=600, impressions=140000, clicks=2400, conversions=48, revenue=2400),
"desktop": dict(spend=400, impressions=60000, clicks=600, conversions=72, revenue=3600),
}
for name, row in segments.items():
m = summarize(**row)
print(name, {k: round(v, 3) for k, v in m.items()})The output shows mobile with a CTR of 0.017, a conversion rate of 0.02, a CPA of 12.5, and a ROAS of 4.0. Desktop shows a CTR of 0.01, a conversion rate of 0.12, a CPA of about 5.56, and a ROAS of 9.0.
Mobile wins on clicks and loses on conversions. Together the two segments give the overall figures from the earlier example (CTR 0.015, conversion rate 0.04, CPA 8.33, ROAS 6.0), which hid that difference.
Reading segment differences
Compare each segment to the overall result and to the baseline you chose earlier. Look at the metric that matches your primary KPI first, then at the stage metrics that explain it.
In the example, mobile attracts clicks cheaply but few of them convert. That points to what happens after the click, such as a slow or cramped page, and not to the ad itself. Desktop has a lower CTR but a much higher conversion rate, so its visitors are more committed.
Watch for small segments
Each extra split divides your data into smaller groups. A segment with 15 conversions can swing by a large percentage from a handful of orders. Check the count behind every rate before you act on it. The next chapter covers how to judge whether a gap is real.
A related trap: mix shifts
If the share of traffic from each segment changes between two periods, the overall rate can move even when no segment changed. For example, if more visitors come from mobile, the total conversion rate falls while both device rates stay the same. Compare segment to segment across periods, not only totals.
Practical steps
- Pick two or three actionable dimensions tied to your goal.
- Compute CTR, conversion rate, CPA, and ROAS for each segment.
- Record the counts (clicks and conversions) beside each rate.
- Flag segments whose results differ most from the total.
- Note which differences you will test for significance in the next step.
Exercise
A campaign has an overall conversion rate of 3%. Email visitors convert at 6% from 400 clicks, and social visitors convert at 1.5% from 2,000 clicks. Which segment should you trust more, and what should you check before moving budget?
Show answer
Social rests on more data (2,000 clicks, about 30 conversions), so its rate is more stable. Email's 6% comes from about 24 conversions, which is a small count and could be noise. Before moving budget, check the counts behind each rate and run a significance test on the gap.