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%', 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 ToROUND(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

    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 dates to UTC.

    COUNT_STRING(matchsource),

    Finds the number of occurrences of match in the source string. Usage: (COUNT_STRING('"PageMatch"',[RP:1:CustomVariables]))

  • Tests:IF(exprthenelse)If expr is nonzero and NOT NULL then this returns then, otherwise it returns else.IFNULL(exprelse)If expr is not NULL then this returns expr, otherwise it returns else.expr LIKE patternPerforms 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 patternPerforms 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 maxIf expr is greater than or equal to min and expr is less than or equal to maxBETWEEN this returns 1, otherwise it returns 0.expr IS NULLexpr IS NOT NULLTests whether a value is (NOTNULL (e.g., NULL IS NULL returns true).