Sub topic 8
Segmenting by interest
Interest segments group subscribers by the topics they care about. This chapter assumes you know what a segment rule is, how events and profile fields are stored, and basic boolean logic. The SQL examples use PostgreSQL and are optional.
What an interest segment is
A behavioural segment asks what a subscriber did recently. An interest segment asks what a subscriber cares about. The two use the same raw data, but interest needs more evidence. One click on a running article might be curiosity or an accident. Several clicks on running content over a few weeks is a much stronger sign.
Interest comes from two kinds of source:
- Declared interest is what the subscriber tells you directly, such as a preference centre checkbox or a signup form choice.
- Inferred interest is what you conclude from actions, such as repeated clicks on one topic.
Declared interest is more reliable and fully consensual. Inferred interest covers subscribers who never filled in a preference, but it can be wrong.
The data you need
Each click needs a topic. There are two common ways to get one:
- Tag every link or content block with a topic when you build the email, and store it as
topicon the click event. - Map each destination URL to a topic after the fact, for example with a lookup table.
Without topics on events, you can only segment by "clicked something", which is behaviour and not interest. Keep the topic list small and consistent. If one editor writes running and another writes Run, your rule will miss subscribers.
Inferring interest with a threshold and a window
A reliable inferred rule has three parts: an event type, a count threshold, and a time window. The query below finds subscribers who clicked at least twice on running content in the last 60 days.
-- PostgreSQL: subscribers who clicked at least twice on running content in the last 60 days
SELECT subscriber_id
FROM events
WHERE event_type = 'email_click'
AND topic = 'running'
AND occurred_at >= now() - interval '60 days'
GROUP BY subscriber_id
HAVING COUNT(*) >= 2;WHERE filters the individual events. GROUP BY collects them per subscriber. HAVING keeps only the subscribers whose count meets the threshold. A plain WHERE cannot do the last step, because the count only exists after grouping.
Choosing the threshold and window
The numbers are a trade-off between precision and reach.
| Setting | Effect | Risk |
|---|---|---|
| Higher threshold (for example 5 clicks) | Fewer false positives | Segment may be too small |
| Lower threshold (1 click) | Larger segment | Includes one-off curiosity |
| Longer window (180 days) | Catches slow, occasional readers | Includes people whose interest has faded |
| Shorter window (14 days) | Reflects current interest | Misses people who send fewer clicks |
Start with a threshold of 2 or 3 and a window that matches how often you send on the topic. If you send running content monthly, a 14-day window will exclude most of your audience.
Combining declared and inferred interest
You can use boolean logic to take the strongest signal from both sources. A subscriber belongs to the running segment if they ticked "running" in the preference centre OR met the click threshold. Use AND NOT to respect explicit opt-outs: if someone unticked running, exclude them even when their clicks qualify. A declared "no" should override an inferred "yes".
Common errors
- Using a single click as interest. This inflates the segment with people who have no real interest.
- Forgetting the time window. Interest from three years ago fills the segment with stale contacts.
- Skipping the subscription check. The events table includes people who have since unsubscribed. Join to the subscribers table and filter on
status = 'subscribed'before sending. - Treating image or link-scanner clicks as human. Security software can click every link in an email. Filter out suspicious bot-like clicks if your platform flags them.
- Inconsistent topic labels. Define the topic list once and reuse it.
Exercise
A subscriber clicked one running link 150 days ago. Your rule is "at least 2 running clicks in the last 60 days". Is the subscriber in the segment, and which two parts of the rule exclude them?
Show answer
No. The count threshold excludes them, because one click is below 2. The time window also excludes them, because 150 days is outside 60 days.
Exercise
A subscriber meets your inferred running rule but unticked "running" in the preference centre last week. Should they receive running content? Explain with boolean logic.
Show answer
No. The rule should be (declared running OR inferred running) AND NOT declared opt-out of running. The explicit opt-out overrides the inferred signal.