This is Part 3 in a multi-part series describ­ing the new clas­si­fi­ca­tions rule builder in Adobe Ana­lyt­ics. If you missed any of the pre­vi­ous install­ments they can be found here:

Overview of the clas­si­fi­ca­tions rule builder

In today’s post I will talk in detail about the user inter­face for the clas­si­fi­ca­tions rule builder and explain how clas­si­fi­ca­tion rules are con­structed and acti­vated. To start with I need to intro­duce some basic terminology:

  1. Rule set. A rule set is a con­tainer for a list of one or more rules. Each rule set applies to one user-specified vari­able within a report suite, but a rule set can be applied to the same vari­able across mul­ti­ple report suites.
  2. Rule. A rule com­prises two parts: A match­ing con­di­tion and a clas­si­fi­ca­tion action.

The basic process for using the rule builder to auto­mat­i­cally clas­sify a vari­able is pretty straight for­ward. You begin by cre­at­ing a new rule set. When cre­at­ing the rule set you spec­ify which vari­able you want to clas­sify (e.g. cam­paign) and which which report suites you want the rule set to apply to. Then you cre­ate a list of rules in the rule set. When you are done build­ing rules you test them using sam­ple keys (e.g. sam­ple track­ing codes, sam­ple search terms, or what­ever you are clas­si­fy­ing.) When you are sat­is­fied your rules work the way you want them to you then acti­vate the rule set.

One acti­vated the rule set will run auto­mat­i­cally on a reg­u­lar sched­ule. (To start with we are run­ning rules once/day. This may change in the future.) Each time the rules run the sys­tem will look for new unclas­si­fied keys (e.g. new unclas­si­fied track­ing codes) that have been passed into Adobe Ana­lyt­ics over the last month or so. Each unclas­si­fied key is eval­u­ated against every rule in the rule set, and the appro­pri­ate clas­si­fi­ca­tion columns are set based on those rules.

In a nut­shell this relieves you from the tasks of down­load­ing, man­ag­ing, and upload­ing clas­si­fi­ca­tions files. They sys­tem does the work for you. Let’s look at the steps in more detail.

Of rule sets…

When you open the rule builder you are pre­sented with a list of rule sets (assum­ing you’ve already built some):

Rule set screen shot

You can see var­i­ous use­ful infor­ma­tion about each rule set:

  • Which vari­able is being classified
  • # of report suites the rule set applies to
  • # of rules in the rule set
  • Sta­tus
  • Date the rule set was last changed

From this screen you can add, edit, delete, and dupli­cate rule sets, and you can see a nice overview of every­thing. The order of the rule sets listed in the table is unim­por­tant because each rule set runs inde­pen­dently of all other rule sets. But you can click on the col­umn head­ers to sort what you are see­ing and you can use the fil­ter to find what you are look­ing for.

..,And of rules

When you add or edit a rule set you are pre­sented with the list of rules in that rule set:

Rules screen shot

From this screen you can add, edit, delete, dupli­cate and rearrange the order of rules within the rule set. Each rule com­prises a match­ing con­di­tion and a clas­si­fi­ca­tion action. There are four dif­fer­ent pos­si­ble match­ing conditions:

  • Starts With
  • Con­tains
  • Ends With
  • Reg­u­lar Expression

The first three match­ing con­di­tions are pretty self-explanatory. You use these to cre­ate sim­ple rules such as “If the string starts with ‘em:’ then set Chan­nel to ‘Email’.” Reg­u­lar expres­sions are a very pow­er­ful and advanced method for cre­at­ing com­plex match­ing con­di­tions. For exam­ple, you can use reg­u­lar expres­sions to cre­ate a rule such as “If the sec­ond sec­tion of this 3-section string which is delim­ited by the colon (:) char­ac­ter con­tains ‘Blue’ or ‘Brown’ then set Color Type to ‘Stan­dard Col­ors’.” Reg­u­lar expres­sions are not for the faint of heart but they pro­vide all sorts of use­ful func­tion­al­ity. I’ll touch more on reg­u­lar expres­sions in my next blog post.

Within the rule set the order of the rules mat­ters. Once the rule set is acti­vated the rules will be eval­u­ated in the order dis­played. It is impor­tant to keep this in mind because in some sit­u­a­tions a given key may match more than one rule. Match­ing more than one rule may or may not be desir­able based on what you are try­ing to accom­plish. When a key matches more than one rule and both rules impact the same clas­si­fi­ca­tion col­umn, the last rule wins (the rule with the higher num­ber.)  

Test­ing and acti­vat­ing rules

From the list of rules you can also ACTIVATE the rule set, or put it back in DEACTIVATED mode. But before acti­vat­ing the rule set you should test your rules using the rule builder’s built-in tester:

Tester screen shot

The basic idea is that you can enter a list of sam­ple key val­ues on the left-hand side of the screen and then run all your rules against those keys to val­i­date that your rules will set clas­si­fi­ca­tions cor­rectly. If you notice some­thing is awry then you can go back and edit your rules and test again. While using the tester you can hover over each cell to see which rules affect that cell. Once you are done test­ing you acti­vate the rule set from the screen that shows you the list of rules.

Impor­tant — keep these few things in mind

Before I close this post there are a few other impor­tant things I need to to tell you that you should keep in mind:

  1. By default clas­si­fi­ca­tion rules will only be eval­u­ated against unclas­si­fied keys. This means rules will not be eval­u­ated against a given key if it pre­vi­ously has had any clas­si­fi­ca­tions applied. That said, there is an option that can be spec­i­fied at the time you acti­vate the rule set that will allow you (the next time the rule set runs) to over­ride clas­si­fi­ca­tions for keys that have come in up to 6 months in the past.
  2. The clas­si­fi­ca­tions import/export tool (for­merly SAINT) can be used to reclas­sify any key that was pre­vi­ously clas­si­fied through the rule builder. This is a handy way to fix errors.
  3. Only stan­dard text clas­si­fi­ca­tions can be clas­si­fied using the rule builder. Date-enabled, Numeric, Numeric 2 and child clas­si­fi­ca­tions can­not be clas­si­fied with the rule builder.
  4. Rules are tied to the text name of the vari­able being clas­si­fied and the text name of the clas­si­fi­ca­tion col­umn spec­i­fied. This allows you to clas­sify the same vari­able and clas­si­fi­ca­tion col­umn in mul­ti­ple report suites.

Up next

Okay that is plenty for today’s post. Next time I’m going to talk a lit­tle more about the power and advan­tages of using reg­u­lar expres­sions in your clas­si­fi­ca­tion rules.



Hi Matt,

Is possible create into rule container, two rules whose keys point have the same name?, for example:

Start with "BF"     then "Hello"

Start with "KJH"   then "Hello"

I check the results in Real-Time report and the results are wrong, can you help me with this issue?

Many Thanks,