What Is Segmentation and How to Use It?

Segmentation in Nelio A/B Testing (Premium) lets you control which visitors participate in a test.

Instead of running a test for everyone who reaches the tested content, you can define specific audiences based on characteristics such as their location, device, browser, language, or how they arrived at your site.

For example, you could run a test only for:

  • visitors from a specific country;
  • mobile users;
  • visitors coming from a particular campaign;
  • logged-out visitors; or
  • visitors accessing your site during certain days or hours.

Segments and Segmentation Rules

Each segment consists of one or more segmentation rules.

For example, you could create a segment called Mobile Visitors from Spain with these rules:

  • Location: Spain
  • Device Type: Mobile

🔍 A visitor must satisfy all the rules within a segment to belong to it.

⚠️ You can only add one rule of each type per segment.

Using Multiple Segments

A test can contain multiple segments.

When you define several segments, a visitor only needs to match one of them to participate in the test.

For example, you could create:

Segment 1: Mobile Visitors

  • Device Type: Mobile

Segment 2: Visitors from Spain

  • Location: Spain

🔍 A visitor who matches either segment can participate in the test.

In other words:

  • Rules within a segment use AND logic.
  • Multiple segments use OR logic.

Organizing Your Segments

If your test includes multiple segments, you can drag and drop them to reorder the list.

Reordering segments doesn’t change how visitors qualify for the test—it simply helps you organize your audience definitions and makes complex segmentation setups easier to manage.

When Is Segment Membership Determined?

Once Nelio A/B Testing evaluates a visitor and assigns them to a segment, that assignment is maintained for the duration of the test.

For example, suppose you use a Window Width rule that includes visitors whose browser window is wider than 1200 pixels.

If a visitor qualifies when they first participate and later resizes their browser to a smaller width, they’ll still belong to the original segment.

This ensures that the visitor’s participation remains consistent throughout the test.


Available Segmentation Rules

Nelio A/B Testing provides several rules for defining your audiences.

URL Parameter

Target visitors based on parameters in the URL.

You can check whether a parameter exists or doesn’t exist, or whether its value matches a particular condition.

This is especially useful for targeting visitors from specific campaigns.

Referrer

Target visitors according to the page or website they came from.

For example, you could create a segment for visitors whose referrer contains a particular domain.

Language

Target visitors according to their browser language.

You can select one or more languages to include or exclude.

Location

Target visitors according to their geographic location, inferred from their IP address.

You can include or exclude visitors from specific countries or regions.

User Login

Target visitors depending on whether they’re logged in or logged out of WordPress.

Useful for excluding internal team members (authors, editors, administrators) from tests.

Day of Visit

Restrict participation based on the day of the week when the visitor accesses your site.

For example, you could run a test only for weekend visitors.

Time of Visit

Target visitors based on the time they access your site.

This can be useful for comparing audiences that visit during different periods of the day.

Browser

Target visitors using a specific browser.

Device Type

Target visitors according to their device type, such as desktop, mobile, tablet, or smart TV.

Operating System

Target visitors according to their operating system (Windows, macOS, Linux, Android, iOS, etc.).

Window Width

Target visitors according to the width of their browser window.

This is particularly useful for tests designed around specific responsive breakpoints.

Cookie

Include visitors who have (or don’t have) a certain cookie, or whose cookie matches a specific value.

IP Address

Target visitors based on their IP address.

This can be useful when you need to restrict a test to visitors coming from specific known addresses.

Reusing Segments Across Tests

If you frequently use the same audience definitions, you don’t need to configure them from scratch every time.

You can save a segment as a Reusable Segment and import it into other tests.

🔍 Learn more: How Do Reusable Goals and Segments Work?

Participation in Heatmaps

You can also control which visitors contribute data to your heatmaps, scrollmaps, and confetti maps.

In a Heatmap Test, you can define a segment in the Participation section to specify which visitors should be included in the behavioral analysis.

🔍 Learn more: Understanding Heatmaps, Scrollmaps, and Confetti Maps