How Rules Are Processed
Important information about how classification rules are processed.
Important Information about Rules
-
Specify group permissions for classifications in Admin Tools.
-
Regular expressions: Help is available under Regular Expressions in Classification Rules.
-
Report suites: You cannot choose a classification until at least one report suite is selected. You cannot apply the report suite until you have created the rule set and assigned a variable.
When you test the rule set, use keys (the variable being classified) from the report to see how they will be impacted by the rule set. (The key is the variable being classified, or the first column in the classification upload table.)
-
Rule priority: If a key matches multiple rules that set the same classification (in the Set Classification column), the last rule that matches the classification is used. See About Rule Priority.
-
Limits on number of rules: No set limit exists for the number of rules you can create. However, a large number of rules may impact browser performance.
-
Processing: Rules are processed at frequent intervals, depending on your volume of classification related traffic.
Active rules process every four hours, examining classification data going back typically one month. The rules automatically check for new values and upload the classifications using the importer.
-
Overwriting existing classifications: See When Do Rules Not Classify Keys? If necessary, you can delete or remove existing classifications, using the importer.
When Do Rules Not Classify Keys?
When you activate rules, you can overwrite existing classifications. In the following situations, a classification rule does not classify a key(variable) if:
-
The key is already classified and you do not select Overwrite Classifications.
You can overwrite classifications when adding and activating a rule, and when activating a data connectors integration. (For data connectors, rules are created by partners in the Dev Center and displayed in the Classification Rule Builder.)
-
A classified key has not appeared in the data after a time frame specified when overwriting a key, even after you enable Overwrite Classifications.
-
The key is not classified and the key is never passed into Adobe Analytics after the time frame beginning about one month ago.
NOTE
In reports, classifications apply to any time frame specified, whenever a key exists. The date range of a report does not affect reporting.
Regular Expressions in Classification Rules
Use regular expressions to match consistently formatted string values with a classification. For example, you can create a classification from specific characters in a tracking code. You can match particular characters, words, or patterns of characters.
Regular Expression - Tracking Code Example
In this example, assume you want to classify the following campaign ID:
Sample Key: em:JuneSale:20XX0601
The parts of the tracking code you want to classify are:
em
= emailJuneSale
= campaign name20XX0601
= date
Regular Expression: ^(.+)\:(.+)\:(.+)$
How the regular expression correlates to the campaign ID:
Match Groups: Shows how the regular expression corresponds to the campaign ID characters, so that you can classify a position in the campaign ID.
This example tells the rule that the campaign date 20XX0601
is at the third group (.+)
, identified by $3
.
Rule Builder
In the Rule Builder, configure the rule as follows:
Select Rule Type | Enter Match Criteria | Set Classification | To |
---|---|---|---|
Regular Expression | ^(.+):(.+):(.+)$ | Campaign Date | $3 |
Syntax
Regular Expression | String or Match Result | Corresponding Match Groups |
---|---|---|
^(.+)\:(.+)\:(.+)$ | em:JuneSale:20XX0601 | $0 : em:JuneSale:20XX0601 $1 : em $2 : JuneSale $3 : 20XX0601 |
Building the syntax | ^ = starts the line () = groups characters and lets you extract matching characters in the parentheses. (.+) = captures one ( . ) character and ( + ) any more \ = start of a string. $ = indicates that the preceding character (or character group) is the last in the line. |
See Regular Expressions - Reference Table for information about what the characters in a regular expression mean.
Regular Expression - Classifying a Specific Character
One way to use a regular expression is to classify a specific character in a string of characters. For example, assume that the following tracking code contains two important characters:
Sample Key: 4s3234
4
= brand names
= identifies a search engine, such as Google
Rule Builder
In the Rule Builder, configure the rule as follows:
Select Rule Type | Enter Match Criteria | Set Classification | To |
---|---|---|---|
Regular Expression | ^.(s).*$ | Brand and Engine | $0 (Captures the first two characters for brand name and search engine.) |
Regular Expression | ^.(s).*$ | Search Engine | $1 (Captures the second character for Google.) |
Regular Expressions - Matching Tracking Codes of Varying Length
This example shows how to identify specific characters between colon delimiters when you have tracking codes of varying lengths. Adobe recommends using one regular expression for each tracking code.
Sample Keys:
a:b
a:b:c
a:b:c:d
Syntax
Rule Builder
In the Rule Builder, configure the rule as follows:
Select Rule Type | Enter Match Criteria | Set Classification | To |
---|---|---|---|
Regular Expression For match string a:b | ^([^\:]+)\:([^\:]+)$ | a | $1 |
Regular Expression For match string a:b | ^([^\:]+)\:([^\:]+)$ | b | $2 |
Regular Expression For match string a:b:c | ^([^\:]+)\:([^\:]+)\:([^\:]+)$ | a | $1 |
Regular Expression For match string a:b:c | ^([^\:]+)\:([^\:]+)\:([^\:]+)$ | b | $2 |
Regular Expression For match string a:b:c | ^([^\:]+)\:([^\:]+)\:([^\:]+)$ | c | $3 |
Regular Expression For match string a:b:c:d | ^([^\:]+)\:([^\:]+)\:([^\:]+)\:([^\:])$ | d | $4 |