---
title: Expert Segments
description: What are expert segments, how can i define them and some helpful examples.
---

[Skip to content](https://doc.sitespect.com/knowledge/advanced-segment#main-content)

English

Show submenu for translations

![Monetate-Logo-Full-Color-1](https://doc.sitespect.com/hs-fs/hubfs/Monetate-Logo-Full-Color-1.png?width=340&height=49&name=Monetate-Logo-Full-Color-1.png)

- [A/B Testing](https://www.sitespect.com/testing-and-experimentation/)
- [Personalization](https://www.sitespect.com/personalization-targeting/)
- [Recommendations](https://www.sitespect.com/recommendations/)

Open main navigation

Close main navigation

- [A/B Testing](https://www.sitespect.com/testing-and-experimentation/)
- [Personalization](https://www.sitespect.com/personalization-targeting/)
- [Recommendations](https://www.sitespect.com/recommendations/)
- English
  
  Show submenu for translations

 How can we help you?

- There are no suggestions because the search field is empty.

1. [Knowledge Base](https://doc.sitespect.com/knowledge?hsLang=en)
2. [Analyze](https://doc.sitespect.com/knowledge/analyze?hsLang=en)

# Expert Segments

## What are expert segments, how can i define them and some helpful examples.

Segments allow you to specify a subset of report data that satisfies the Filters you define. When you generate a report for an Experiment, you can apply multiple Segments so that the report uses only data that matches all of the selected Segments. This can be helpful in demonstrating if different user groups or behaviors react differently. Segments offers a limited input field when defining these groups.

By contrast Expert Segments allow for the creation of more complex identification of groups of users and behaviors within experiments then standard segments. To allow for this Expert Segments offers an open field input for expressions. These can be thought of in a similar way to that of equations in Microsoft Excel.

**Notes on Segments (Expert Mode):**

- The Segment Expression allows you to combine fields using standard SQL Operators. Each is explained within the list of available operators tool tip.
- To add fields to the Segment Expression, select a field from the **Variable** drop-down.
- You can include literal numbers and text strings, but you must surround all strings with single quotes.
- You can use parenthesis to group fields and expressions and to change the order of operations.
- Once you have defined a Segment, it appears on the Segments drop-down on each of the Reports pages.

**Examples of Expert Segments: **

*How to locate a single SiteSpect User ID aka SSGUID:*

\[GUID\] REGEXP ("7480927040909101009")

*How to locate multiple SiteSpect User ID aka SSGUID:*

 \[GUID\] REGEXP ("7480927040909101009") OR  
\[GUID\] REGEXP ("7327215384023603335")

 

*How to identify users who viewed a speciifc page via Universal Page URL Capture metric:*

if(\[RP:4089:CustomVariables\] LIKE '%[https://www.site.com/category1/product2.html%](https://www.site.com/category1/product2.html%)', 1, 0)

 

*How to identify time and date periods for inclusion/exclusion by Start Time (day, hour etc that uses epoch time format):*

(\[StartTime\] \>= 1575864000 && \[StartTime\] \<= 1575892800) OR  
(\[StartTime\] \>= 1575950400 && \[StartTime\] \<= 1575979200)

 

**Notes on Segments (Expert Mode):**

**Expert Segment Filters:**

**Metrics:** A list of active Metrics and their Data Points. Only those Campaigns that include the selected Metrics may use this Segment.

**Custom Variables:** A list of active Custom Variables and their Data Points. Only those Campaigns that include the selected Custom Variables may use this Segment.

**Visit Number Within Test:** The number of the visit by the user within the context of the Campaign. (For example, the visit during which the user is assigned to the Campaign is the 1st visit in the Campaign, the next visit is the 2nd, and so on.)

**Referring URL:** The URL of the page that is referring the user to your Site (for example, the URL of a search engine that made the referral).

**Entry URL:** The URL of the page where the user entered your Site (i.e., the landing page URL). This variable is fully qualified (e.g., http://www.sitespect.com/).

**User Agent:** The user's web browser User-Agent string for a visit.

**Pageviews:** The total number of pages viewed during the visit.

**Visit Length (secs):** The elapsed time of the visit in seconds.

**Bounce (single page visit):** The indication that a user left your Site without visiting more than one page during the visit.

**Day of Week:** The day of the week that visits begin on.

**Start Time:** The time a user's visit began.

**Time Since First Visit (days):** The total number of days since a user first visited your Site.

**Total Visits (including current):** The total number of visits by the user, including the current visit.

**Mobile Attribute:** The mobile device attributes.

**Is Smartphone:** Whether the user is visiting your site on a smartphone (1) or non-smartphone (0).

**Geo Location:** An international list of locations.

**User's IP Address:** The IP address of the user visiting your Site.

**GUID:** SiteSpect's Global Unique ID for a user visiting your site. Only matches against the numeric portion of the GUID, e.g. to match the user with GUID G1234567890 search for 1234567890.

**Variation Group ID:** The Variation Group the user is assigned to within the Campaign being analyzed. Only matches if the specified Variation Group is included in the Campaign being analyzed.

**Concurrently Assigned Campaign:** A list of other Campaigns a user is assigned to while also assigned to this Campaign.

 

**Available Operators:**

Use the following set of mathematical and logical operators in your equation:

- **Mathematical:**`+` Addition`-` Subtraction`*` Multiplication`/` Division`()`Grouping - Follows standard mathematical order of operation rules.`=` Equal To`<=>``NULL`-safe equal to. Performs an equality comparison like the `=` operator but returns 1 rather than `NULL` if both operands are `NULL` and 0 rather than `NULL` if one operand is `NULL`.`<>`, `!=`Not Equal To`<` Less Than`>` Greater Than`<=` Less Than or Equal To`>=` Greater Than or Equal To`ROUND(n)`, `ROUND(n, d)`Rounds the argument *n* to *d* decimal places. *d* defaults to 0 if it is not specified.
- **Logical:**`AND`, `&&`Logical `AND`. Returns 1 if all operands are nonzero and not `NULL`. Returns 0 if one or more operands is 0. Otherwise, it returns `NULL`.`OR`, `||`Logical `OR`. When both operands are non-`NULL`, returns 1 if any operand is nonzero and 0 otherwise. If an operand is `NULL`, it returns 1 if the other operand is nonzero and `NULL` otherwise. If both operands are `NULL`, it returns `NULL`.`NOT`, `!`Logical `NOT`. Returns 1 if the operand is 0; 0 if the operand is nonzero; `NULL` if the operand is `NULL`.
- **Misc.:**`NULL`
  
  A `NULL` value represents an unknown variable in a Campaign. Any operation involving a `NULL` value results in `NULL`; a `NULL` value is not true in a test operation (e.g., `NULL = NULL` returns `NULL`, which evaluates to false).
  
  The Data Points for past visits to a Campaign when a Metric is added are `NULL`.
  
  The Value Capture Data Point for a Metric that did not match is `NULL`.
  
  When the location of a visit cannot be determined, the Geographic Location variables are `NULL`.
  
  Mobile device variables for non-mobile or unknown device users are `NULL`.
  
  `UNIX_TIMESTAMP()`, `UNIX_TIMESTAMP(date)`
  
  If called with no argument, returns the current Unix timestamp (seconds since 1970-01-01 00:00:00 UTC). If called with a *date* argument, it returns the value of the argument as seconds since 1970-01-01 00:00:00 UTC. *date* is a string in the format `'YYYY-MM-DD HH:MM:SS'`, or a number in the format YYYYMMDDHHMMSS. The *date* is interpreted as a value in UTC.
  
  This function is used with the Start Time variable to perform date calculations. For example, to test if a visit started within a time frame, use an equation such as: `[Start Time] BETWEEN UNIX_TIMESTAMP(20120701040000) AND UNIX_TIMESTAMP(20120705035959)`. Remember to convert the *date*s to UTC.
  
  `COUNT_STRING(match, source)`,
  
  Finds the number of occurrences of match in the source string. Usage: (COUNT\_STRING('"PageMatch"',\[RP:1:CustomVariables\]))
- **Tests:**`IF(expr, then, else)`If *expr* is nonzero and `NOT NULL` then this returns *then*, otherwise it returns *else*.`IFNULL(expr, else)`If *expr* is not `NULL` then this returns *expr*, otherwise it returns *else*.`expr LIKE pattern`Performs pattern matching using SQL simple Regular Expression comparison.`%`Matches any number of characters, even zero characters.`_` Matches exactly one character.`\%` Matches one "%" character.`\_` Matches one "\_" character.`expr REGEXP pattern`Performs pattern matching using SQL Regular Expression comparison. SQL RegEx supports only a limited subset of SiteSpect's RegEx capibilities. Non-greedy quantifiers (`.*?`) and escape characters (`\d`) are not supported.  
  Each REGEXP expression has a limit of 30,000 characters. The entire segment expression cannot exceed 1,000,000 characters.`expr BETWEEN min AND max`If *expr* is greater than or equal to *min* and *expr* is less than or equal to *max*, `BETWEEN` this returns 1, otherwise it returns 0.`expr IS NULL`, `expr IS NOT NULL`Tests whether a value is (`NOT`) `NULL` (e.g., `NULL IS NULL` returns true).

- [Get Started](https://doc.sitespect.com/knowledge/get-started?hsLang=en#main-content)

    - [SiteSpect Support](https://doc.sitespect.com/knowledge/get-started?hsLang=en#sitespect-support)
    - [Overview Information](https://doc.sitespect.com/knowledge/get-started?hsLang=en#overview-information)
    - [Intro to SiteSpect](https://doc.sitespect.com/knowledge/get-started?hsLang=en#intro-to-sitespect)
    - [Account Setup](https://doc.sitespect.com/knowledge/get-started?hsLang=en#account-setup)
    - [Artificial Intelligence](https://doc.sitespect.com/knowledge/get-started?hsLang=en#artificial-intelligence)
- [Dashboard](https://doc.sitespect.com/knowledge/dashboard?hsLang=en)
- [Build](https://doc.sitespect.com/knowledge/build?hsLang=en#main-content)

    - [Setting Up a Campaign](https://doc.sitespect.com/knowledge/build?hsLang=en#setting-up-a-campaign)
    - [Create a Client-Side Campaign](https://doc.sitespect.com/knowledge/build?hsLang=en#create-a-client-side-campaign)
    - [Create a Server-Side Campaign](https://doc.sitespect.com/knowledge/build?hsLang=en#create-a-server-side-campaign)
    - [Metrics](https://doc.sitespect.com/knowledge/build?hsLang=en#metrics)
    - [Audiences](https://doc.sitespect.com/knowledge/build?hsLang=en#audiences)
    - [Triggers](https://doc.sitespect.com/knowledge/build?hsLang=en#triggers)
    - [Variations](https://doc.sitespect.com/knowledge/build?hsLang=en#variations)
    - [Traffic Management](https://doc.sitespect.com/knowledge/build?hsLang=en#traffic-management)
    - [Preview](https://doc.sitespect.com/knowledge/build?hsLang=en#preview)
    - [Factors](https://doc.sitespect.com/knowledge/build?hsLang=en#factors)
    - [Advanced Settings](https://doc.sitespect.com/knowledge/build?hsLang=en#advanced-settings)
    - [Omnichannel](https://doc.sitespect.com/knowledge/build?hsLang=en#omnichannel)
    - [Regular Expressions (Regex)](https://doc.sitespect.com/knowledge/build?hsLang=en#regular-expressions-regex)
    - [WATTS](https://doc.sitespect.com/knowledge/build?hsLang=en#watts)
    - [Recommendations](https://doc.sitespect.com/knowledge/build?hsLang=en#recommendations)
- [Monitor](https://doc.sitespect.com/knowledge/monitor?hsLang=en)
- [Analyze](https://doc.sitespect.com/knowledge/analyze?hsLang=en#main-content)

    - [Data Export and Integration](https://doc.sitespect.com/knowledge/analyze?hsLang=en#data-export-and-integration)
    - [SiteSpect Reports](https://doc.sitespect.com/knowledge/analyze?hsLang=en#sitespect-reports)
- [Site](https://doc.sitespect.com/knowledge/site?hsLang=en#main-content)

    - [Tools](https://doc.sitespect.com/knowledge/site?hsLang=en#tools)
    - [Configuration](https://doc.sitespect.com/knowledge/site?hsLang=en#configuration)
- [Developers](https://doc.sitespect.com/knowledge/developers?hsLang=en#main-content)

    - [API Reference](https://doc.sitespect.com/knowledge/developers?hsLang=en#api-reference)
    - [Code Samples](https://doc.sitespect.com/knowledge/developers?hsLang=en#code-samples)
    - [Tips & Tricks](https://doc.sitespect.com/knowledge/developers?hsLang=en#tips-tricks)
- [Mobile](https://doc.sitespect.com/knowledge/mobile?hsLang=en)
- [Implementation, Deployment, and Security](https://doc.sitespect.com/knowledge/implementation-deployment-and-security?hsLang=en#main-content)

    - [How does SiteSpect work with CDNs?](https://doc.sitespect.com/knowledge/implementation-deployment-and-security?hsLang=en#how-does-sitespect-work-with-cdns)
    - [Single Tenant Implementations](https://doc.sitespect.com/knowledge/implementation-deployment-and-security?hsLang=en#single-tenant-implementations)
    - [Security Features](https://doc.sitespect.com/knowledge/implementation-deployment-and-security?hsLang=en#security-features)
    - [Deployment and Implementation Overview](https://doc.sitespect.com/knowledge/implementation-deployment-and-security?hsLang=en#deployment-and-implementation-overview)
    - [SiteSpect Engine & Admin API](https://doc.sitespect.com/knowledge/implementation-deployment-and-security?hsLang=en#sitespect-engine-admin-api)
- [Third-Party Integration](https://doc.sitespect.com/knowledge/third-party-integration?hsLang=en#main-content)

    - [Google](https://doc.sitespect.com/knowledge/third-party-integration?hsLang=en#google)
    - [Zuko](https://doc.sitespect.com/knowledge/third-party-integration?hsLang=en#zuko)
- [Troubleshooting](https://doc.sitespect.com/knowledge/troubleshooting?hsLang=en)
- [Releases](https://doc.sitespect.com/knowledge/releases?hsLang=en#main-content)

    - [Superfresh](https://doc.sitespect.com/knowledge/releases?hsLang=en#superfresh)
- [Feedback](https://doc.sitespect.com/knowledge/feedback?hsLang=en)

- [A/B Testing](https://www.sitespect.com/testing-and-experimentation/)
- [Personalization](https://www.sitespect.com/personalization-targeting/)
- [Recommendations](https://www.sitespect.com/recommendations/)

[![Monetate-Logo-Full-Color-1](https://doc.sitespect.com/hs-fs/hubfs/Monetate-Logo-Full-Color-1.png?width=200&height=29&name=Monetate-Logo-Full-Color-1.png "Monetate-Logo-Full-Color-1")](http://monetate.com)

<https://www.facebook.com/> <https://www.twitter.com/> <https://www.instagram.com/> <https://podcasts.apple.com/> [mailto:email@email.com](mailto:email@email.com)

Copyright © 2026, Monetate