# Segmentation

**Audience segmentation means evaluating who a visitor is against your own rules, on the server,
before the page is rendered.** A CDP tells you what happened. Croct lets you act while it is happening.
Audiences are evaluated in real time, including on the first pageview, and they are available
to content and experiments the moment a visitor qualifies.

## How it works

Audiences are written in CQL, an English-like query language, so a segment reads as a sentence:
`user is returning and location's city's name is "New York"`. They combine real-time behavior,
profile traits, and historical data, with more than 100 signals available out of the box across
events, location, marketing, session, shopping, user and web technology, plus any custom attribute
you define.

As you build a segment, live estimates show its volume, so you can tell whether an audience is worth
targeting before you write the content for it.

Evaluation runs on the server with latencies under 40 milliseconds, which means segmentation
happens before the response is sent rather than after the page has painted.

## Features

- **Real-time evaluation.** A visitor enters an audience the moment they qualify, including on the first pageview.
- **Server-side evaluation.** Segments resolve before render, so there is no flash of the wrong content.
- **CQL.** Segments written in readable English, and soon in a query builder.
- **100+ built-in signals.** Behavior, location, campaign, session, device, shopping, and profile traits, with no instrumentation.
- **Audience estimator.** Live volume estimates while you build.
- **Anonymous activation.** Intent predicted from live signals, before anyone identifies themselves.
- **Custom attributes.** Your own traits alongside the built-in signals.
- **AND/OR logic.** Chain conditions to express the segment you actually mean.
- **Recency and frequency.** Narrow a segment by how recently and how often something happened.
- **Segmented analytics.** Every dashboard readable by audience.
- **Data export.** Profiles and audiences flow to your warehouse or any tool you run.
- **Privacy controls.** Rules enforced at the platform level rather than page by page.

## Building with it

Segmentation is part of the platform, so there is no CDP to buy, connect, or keep in sync.
Audiences created here are immediately usable by personalization and by segmented experiments.

Setup is one command, `npx croct@latest init`, which installs the SDK, wires the provider
and generates TypeScript types for every slot. Official SDKs cover Next.js, React, Vue,
Nuxt, JavaScript, PHP, Laravel, Symfony, Drupal, and Shopify Hydrogen. Most teams are live
the same day, and the forever-free plan needs no credit card or commitment.

## Frequently asked questions

### What criteria can I use to build user segments in Croct?

You can build segments using a [wide variety of criteria](https://docs.croct.com/explanation/audience/popular-audiences),
including marketing campaign engagement, geographic location, technology and devices used,
session data, declared or inferred interests, specific user activities, completed goals,
navigation history, shopping cart status, past order history, and much more.

### What types of signals can be used to build audiences?

We provide over 100 out-of-the-box [signals](https://docs.croct.com/reference/cql/context) to
build high-impact segments. These include behavioral events, geolocation data, marketing campaign
sources, session activity, shopping actions, web technology, custom profile attributes, and
real-time intent inferred from anonymous signals.

### Do I need a CDP to segment visitors?

No. Real-time profiles, segmentation, and data unification are built in, so there is no external
customer data platform to buy, connect, or keep in sync, and no historical data needed to get
started. You can still connect a CDP to enrich profiles if you already run one.

### Are segments evaluated in real-time as users navigate my site?

Yes. We [evaluate audience criteria](https://docs.croct.com/explanation/audience/introduction)
against a user's current context, including the pages they visit and their immediate behavior,
as they interact with your application. This real-time profiling allows you to trigger immediate
actions, and the engine can perform evaluations with latencies under 40 milliseconds.

### Are audiences evaluated on the server or in the browser?

On the server. Audience conditions resolve before the response is rendered, which means personalized
content arrives in the first HTML response with no flicker and no client-side round trip.
Segmentation can also depend on data that never reaches the browser.

### Does it work on anonymous visitors?

Yes. Audiences are built from live behavioral signals such as campaign source, location, and
session activity, so they apply from the first pageview, before a visitor identifies themselves.

### Can I build segments using AND/OR logic?

Yes, you can build highly specific segments by [combining multiple criteria](https://docs.croct.com/explanation/audience/examples/multiple-conditions),
mixing and matching events and attributes to fit your exact business goals. Using logical operators
like `and`, you can easily chain conditions together, such as
`location's city's name is "New York" and cart's subtotal is greater than 100`.

### Can I specify recency and frequency while building segments?

Yes, in the Scale plan, you can use [event-based segmentation](https://docs.croct.com/reference/cql/expressions/events/overview)
to narrow your audience criteria by specifying recency and frequency, addressing identified gaps,
and creating highly specific segments.

### What is the CQL, and how do I use it to define audiences?

[Contextual Query Language (CQL)](https://docs.croct.com/reference/cql/introduction) is an
English-based query language tailored for personalization and experimentation. It acts as an
abstraction layer that turns complex data points into simple, natural-language business rules.
You use it to unambiguously define audience criteria, such as `user is returning`, so that
both technical and non-technical team members can target specific users without writing complex code.

### Can I segment on data Croct doesn't collect?

Yes. Pass your own attributes, such as subscription plan, quota usage, or account age,
as [context](https://docs.croct.com/reference/cql/context) at request time and reference them
in your audience conditions alongside the built-in signals.

### How much historical data do I need to start?

None. Audiences work from the first pageview, using live signals rather than accumulated history.

### Can I estimate the size and relevance of an audience before launching an experience?

Yes, you can. We feature an audience estimator that provides real-time audience volume estimates
as you build your segments. This helps you validate the size and relevance of an audience before
investing time in execution, allowing you to prioritize the segments that drive the most results.

### How do segments impact my dashboards?

Segments power our segmented [analytics](https://docs.croct.com/reference/analytics), allowing you
to break down insights by audience behavior. This lets you drill down into any metric by audience
to uncover hidden opportunities and see exactly which pages, products, or features drive each
segment's engagement.

### Is there a limit to how many segments I can create?

Yes, it varies by plan (free, growth, or scale). In addition to the plan quota, you can buy extra
audience packages as add-ons.

### What does it cost?

The forever-free plan covers 10,000 monthly active users with 3 content slots and 1
experience or experiment, and needs no credit card. Growth starts at $100 per month billed
annually for 20,000 monthly active users. Scale is custom.
