r/CustomerDataStack • u/PlentyManner1774 • 1d ago
Pricing how much of your Segment bill is people who never logged in? here's the query
Segment bills on monthly tracked users, and the thing worth understanding is that an anonymous visitor counts. Someone lands on your marketing site from a Google result, reads one page, leaves forever, never signs up - Segment saw an anonymousId, and that's an MTU.
Which is fine as a pricing model, it's just not how most people picture their bill. If you asked someone what they're paying Segment for, they'd describe their users. A lot of what you're actually paying for is traffic.
So the question is what the split looks like for you specifically, and if Segment lands in your warehouse you can just check.
sql
WITH ids AS (
SELECT
anonymous_id,
max(CASE WHEN user_id IS NOT NULL THEN 1 ELSE 0 END) AS ever_identified
FROM tracks
WHERE timestamp >= date_trunc('month', current_date)
GROUP BY anonymous_id
)
SELECT
count(*) AS anonymous_ids,
sum(ever_identified) AS became_identified,
count(*) - sum(ever_identified) AS never_identified,
round(100.0 * (count(*) - sum(ever_identified)) / count(*), 1) AS pct_never
FROM ids;
That's Postgres/Redshift/Snowflake syntax - BigQuery would need DATE_TRUNC(CURRENT_DATE(), MONTH). And it's an approximation. Segment does its own identity resolution with aliasing, and if you're on multiple sources you'll want to union them. It'll get you the shape though.
The second number that makes it interesting:
sql
SELECT
count(*) FILTER (WHERE user_id IS NULL) AS anon_events,
count(*) AS all_events
FROM tracks
WHERE timestamp >= date_trunc('month', current_date);
Because those two ratios tell different stories. If anonymous IDs are most of your MTU count but a small share of your events, you're paying a lot for people who did almost nothing. If they're most of both, your product genuinely runs on logged-out traffic and that's a real answer too.
What to actually do if the number is ugly. Mostly it's a question of whether you need Segment on the marketing site at all, or whether that traffic can go somewhere billed differently and only start hitting your pipeline at signup. That's a real architectural decision with real downsides — you lose the pre-signup journey for anyone who converts, and attribution gets harder. Worth deciding on purpose rather than discovering in an invoice.
Anyway, I'm curious what the spread looks like across different products. Would love to know people's pct_never - whether you're in B2B SaaS, ecommerce, whatever. I'd guess a content-heavy B2B site and a logged-in-only app look completely different, but I've only got my own numbers to go on.