Classification sets rules

You use rules to support automatic classifications in scenarios where your key dimension is constantly changing. The update of classifications through upload or automation becomes a cumbersome process or lags proper classification for new dimension values. For example, internal campaigns, tracking codes, or product SKUs.

The dimension must contain values that allow you to apply one or more rules so you can derive classification data from the dimension values.

You define rules within the context of a classification set. This context implies that rules are applied (when activated) to all report suite and key dimension combinations that are subscribed to the classification set. This implementation is different from how the legacy Classification rule builder works. In the Classification rule builder, you define one or more rules as part of a rule set separately, and then associate the rule set with one or more report suites. In the new interface, the rules within the classification set are also referred to as rule set. However, the rule sets are defined within the same interface where you configure other classification set attributes.

To define a rule set for a classification set:

  1. Select Components from the Adobe Analytics top menu bar, then select Classification sets.

  2. In Classification Sets, select the Classification Sets tab.

  3. In the Classifications Sets manager, select the classification set for which you want to define the rules.

  4. In the Classification Set: classification set name dialog, select the Rules tab.

    • If you are accessing the Rules interface for the first time for a classification set, or decided so far to continue to use the legacy rules builder interface, you are presented with a dialog that allows you to select how to get started. The options are:

      • Migrate existing rules. Import your current classification rules and continue to work with these rules in the new interface. Your existing rules are preserved and converted to the new format.

        • Select Migrate rules to continue.

        • In the Confirm migration dialog, read the implications of the migration.

          • Select Migrate rules to confirm the migration. After the migration is completed, use the Rule set interface to create new rules and edit your existing migrated rules.
          • Select Cancel to cancel the migration
      • Start fresh. Create new classification rules from scratch using the new rule builder. Select this option if you want to redesign your classification logic or start fresh with new classification rules.

        • Select Create new rules to continue.

        • In the Confirm start fresh dialog, read the implications of a fresh start.

          • Select Start fresh to confirm a fresh start and discard any existing rules. Use the Rule set interface to create new rules.
          • Select Cancel to cancel.
      • Use legacy interface. Continue to use the previous rule builder interface. You can migrate to the new experience at any time when you’re ready.

        • Select Go to legacy interface to continue. You are directed to the legacy Classification Rule Builder interface.
    • If you already have migrated rules or created new rules for a classification set, you end up directly in the Rule set interface.

Rule set interface rule-set-interface

To create or edit rules, use the Rule set interface.

Rule set interface

Name
Description
1
Functions
You use the Functions area to select and drag and drop your functions to the rule set builder.
2
Rule set builder
You build your rule set using one or more rules. A rule is the implementation of a function and always associated with only one function. A function can have multiple operators. You create a rule by dragging and dropping a function into the rule set builder. The function type defines the interface of the rule.
See the Rule interface for more information.
You can insert functions at any place, and the functions are executed in sequence to determine the final values for the classifications.
Use Collapse all to collapse all rules and use Expand all to expand all rules.
3
Status
Show the status and last modified date of the rule set.
Select Activate to activate the rule set.
Select Deactivate to deactivate the rule set.
4
Lookback
Specify the lookback window for the rule set.
Select an option (from 1 month to 6 months) from the drop-down menu.
Select Perform lookback to perform a lookback using the selected lookback period.
5
Test options

Use sample key dimension values to test the classifications:

  • Add or paste values in the Sample keys text area.
    Check Remember sample keys to ensure that sample keys persist across different usage of the rule set interface.
  • Select Test rule set to test your rule set.

Rule interface

You define each individual rule within the rule set in the Rule interface. The interface consists of the following elements:

Rule interface

Description
1
The name of the selected function and the input entered for the function.
2
The input for the selected function. The input depends on the selected function. For example, for the Regular expression function, the input is a regular expression. And for the Split function, the input is a token. Enter the appropriate input for the specific function. For example, ^(.+)\:(.+)\:(.+)$ for a regular expression that identifies three classifications in an internal campaign code.
3
Each operation sets a specific classification to a value.
Select a classification from the Set Classification drop-down menu and enter a value for to.
Use CrossSize400 to delete an operation from the list.
4
Select Add Add operation to add an additional operation to the function.
5
Select ChevronDown to collapse the rule. Select ChevronLeft to expand the rule.
Select CrossSize400 to delete the rule.

Function reference

For each supported function, find details below on required input and sample use cases.

Starts With…

Sets a classification based on a specific value that the key dimension starts with.

Details

Required input

Enter a value for Starts With. For example: em.

Use case

You want to define a rule to assign Email as the value for the Channel classification when the value for key dimension Internal Campaign starts with em (for example: em:FY2025:Summer Sale).

tabs
Rule Rule - Starts With
Test results Rule - Starts With Test Results

Ends With…

Sets a classification based on a specific value that the key dimension ends with.

Details

Required input

Enter a value for Ends With. For example: 2025.

Use case

You want to define a rule to assign 2025 as the value to the Year classification when the value for key dimension Internal Campaign contains 2025 (for example: em:Summer Sale:FY2025).

tabs
Rule Rule - Ends With
Test results Rule - Ends With Test Results

Contains…

Sets a classification based on a specific value that the key dimension contains.

Details

Required input

Enter a value for Contains. For example: Winter.

Use case

You want to define a rule to assign Winter Sale as a value to the Type classification when the value for key dimension Internal Campaign contains with Winter (for example: fb:Winter:FY2024).

tabs
Rule Rule - Contains
Test results Rule - Contains Results

Matches

Sets a classification based on a specific value that matches with the key dimension value.

Details

Required input

Enter a value for Matches. For example: em:Summer:2025.

Use case

You want to define a rule to assign Email as a value to the Channel classification, Summer Sale as a value to the Type classification, and 2025 to the Year classification. But only when the value for key dimension Internal Campaign matches em:Summer:2025.

tabs
Rule Rule - Matches
Test results Rule - Matches

Regular expression

Sets one or more classifications based on a regular expression applied to the key dimension value.

Details

Required input

Enter a value for Regular Expression. For example: ^(.+)\:(.+)\:FY(.+)$.

Use case

You want to define a rule to assign values to the Channel, Type, and Year classifications by applying the regular expression ^(.+)\:(.+)\:FY(.+)$ and using match groups ($1, $2, and $3) to the values for the key dimension Internal Campaign.

tabs
Rule Rule - Regular expression
Test results Rule - Regular expression Test results

Reference Table

See below for a reference table of regular expressions.

table 0-row-2 1-row-2 2-row-2 3-row-2 4-row-2 5-row-2 6-row-2 7-row-2 8-row-2 9-row-2 10-row-2 11-row-2 12-row-2 13-row-2 14-row-2 15-row-2 16-row-2 17-row-2 18-row-2 19-row-2 20-row-2 21-row-2 22-row-2 23-row-2 24-row-2 25-row-2 26-row-2
Regular expression Description
(?ms) Match the entire regular expression against a multi-line input, allowing the . wildcard to match any newline characters
(?i) Match the entire regular expression to be case insensitive
[abc] A single character of: a, b or c
[^abc] Any single character except: a, b, or c
[a-z] Any single character in the range a-z
[a-zA-Z] Any single character in the range a-z or A-Z
^ Start of line (matches the beginning of the line)
$ Match the end of the line (or before the newline at the end)
\A Start of string
\z End of string
. Match any character (except a new line)
\s Any whitespace character
\S Any non-whitespace character
\d Any digit
\D Any non-digit
\w Any word character (letter, number, underscore)
\W Any non-word character
\b Any word boundary
(...) Capture everything enclosed
(a\b) a or b
a? Zero or one of a
a* Zero or more of a
a+ One or more of a
a{3} Exactly 3 of a
a{3,} 3 or more of a
a{3,6} Between 3 and 6 of a

Split

Splits the key dimension value, based on a token, to one or more classifications.

Details

Required input

Enter a value for Split. For example: :.

Use case

You want to define a rule that splits the values for key dimension Internal Campaign to the Channel, Type, and Year classifications based on the : Token.

tabs
Rule Rule - Split
Test results Rule - Split Test results

Rule priority

The last rule determines the value for the classification if:

  • A key dimension value is matched to multiple rules.
  • The rules set contain rules with the same Set Classification operation.

So, you should rank the most important Set Classification operation as part of the last rule in your rule set.

If you create multiple rules that do not share the same Set Classification operation, processing order does not matter.

Example

You want to classify with the classification Type how users search for an athlete using the search string as the key dimension. For example, using this rule set:

Rules priority

  • When a user searches for Cowboys Fantasy Tony Romo, Romo is classified as Type.
  • When a user searches for Cowboys Fantasy Tony Romeo, Fantasy is classified as Type.
  • When a user searches for Cowboys vs. Broncos, Team is classified as Type.
recommendation-more-help
46b8682c-fda6-4669-9355-1a44923e549e