A segment is a saved question
Every visitor who interacts with your site accumulates a record: who they are if they told you, how many sessions they have had, when you first saw them, when you last did. Individually those records are only useful when somebody is looking at one. A segment turns them into a group you can name.
The useful way to think about it is a saved question rather than a saved list. You are not picking people; you are writing a rule, and the rule is answered fresh whenever it is used. Visitors who have been back more than three times but have never given an email address is a question. Whoever satisfies it today is the answer, and it will be a different set of people next week without you touching anything.
That distinction matters because it decides which segments stay useful. A rule describing a behaviour keeps working. A rule describing a moment, such as everybody seen during one launch week, is a snapshot that quietly stops being true.
A segment is not the same tool as a chat trigger, and the difference is where each one runs. A segment is answered on the server from stored visitor records, so it can ask about history. A trigger is answered in the visitor's browser during a single page view, from a much shorter list of signals — what your chat triggers can actually measure covers that list and how each item is counted.
The fields you can filter on
Segments are built from the visitor record, and it is worth knowing exactly what is in it before you plan around fields that do not exist. There are nine, and they fall into three natural groups.
- Identity: name, email address, phone number, and company. These are only populated when a visitor supplied them, which in practice means through a pre-chat form or an integration.
- Behaviour: session count and event count. These are counts your site accumulates on its own, so unlike identity they are populated for anonymous visitors too.
- Timing: first seen and last seen, both recorded in UTC.
There is also a visitor key, the internal identifier for the record, which is mostly useful when you are matching against something outside the system.
Beyond the nine, you can filter on custom attributes you have attached to visitors yourself. That is the escape hatch for anything specific to your business, such as a plan name or an account tier, and it is worth knowing that attributes are matched as text rather than as numbers or dates. A plan attribute works well. Storing a number in an attribute and expecting greater-than to work does not.
The most common planning mistake is assuming identity fields are widely populated. On most sites the majority of visitor records are anonymous, so a segment built on email will describe a small and unrepresentative slice. If you want more of those fields filled, the lever is what you ask for before the chat starts, which is covered in the custom fields guide.
Which operators apply to which field
The operators available depend on the kind of field, and the mismatches are the usual source of a segment that returns nothing.
Text fields support equals, does not equal, contains, and starts with. Contains is the workhorse and the one to reach for when matching a company or a domain, because it does not care where in the value the match falls.
Count fields support equals and the four comparisons: greater than, greater than or equal, less than, and less than or equal. This is where the genuinely behavioural segments live, because a session count is the closest thing you have to a measure of interest that the visitor did not have to declare.
Date fields work differently from the other two, and this is the detail worth carrying away. You do not pick calendar dates. You filter by age, in days: seen within the last so many days, or not seen for more than so many days. That is why date segments keep working rather than going stale, because the window moves with you.
Any field can also be tested for whether it is present at all. That pairs neatly with the anonymity problem above: visitors with several sessions and no email on file is one rule, and it describes exactly the group most worth a proactive approach.
Preview the count before you save
The segment builder can tell you how many visitors currently match before you commit to the rule, and skipping that step is the single most common way to end up with a segment nobody trusts.
Two numbers should make you stop. Zero almost always means an operator and field mismatch, or an identity field that is far emptier than you assumed, rather than a genuine absence of matching people. A number close to your entire visitor population means a condition is not doing what you think, most often a contains match on a value so short it matches everything.
The habit worth building is to predict the count out loud before looking. If you expect a few hundred and see six, you have learned something about your data rather than about your visitors, and it is much cheaper to learn it now than after the segment is driving something.
Start each rule broad and narrow it one condition at a time, checking the count after each. A segment assembled all at once and returning zero gives you no information about which condition is responsible.
Segments that stay useful
A few patterns tend to survive contact with a real site, and they share a shape: each describes a behaviour rather than a moment, so each keeps answering itself.
- Returning but unidentified. Several sessions, no email on file. These are people who keep coming back and have never told you who they are.
- Lapsed. Not seen for a set number of days, but with enough history to show they were once engaged. The date operators make this one maintain itself.
- Known accounts. Company contains your customer domain, or a plan attribute equals a tier you care about.
- New and active. First seen recently, with a session count already above one. A short, high-intent group.
Once a segment exists it becomes available to the parts of the product that need an audience rather than an individual, which is what makes the effort worth it. Naming matters more than it sounds: a segment called Test or Segment 2 will be untrustworthy within a month, because nobody will remember which rule it holds. Name it after the rule, not the intention.
Finally, revisit them. Segments are written against how your site collected data on the day you wrote them, and a change to your pre-chat form or your tracking can quietly empty one. A segment whose count has drifted to zero is not an empty audience; it is usually a broken rule. Keeping an eye on the numbers you rely on is the same discipline as the rest of your reporting, which the analytics overview covers.