Expand my Community achievements bar.

SOLVED

Is there a way to test if any regex rules are overlapping in Classification Rule Builder?

Avatar

Level 3

Anybody know of a way to test your classification rules to see if they overlap by chance?  Im not referring to testing from within rule builder- like we normally do before we activate the new ruleset, I'm curious if anybody knows of either the best way to test all rules with some 3rd party tool, or to test the rule builder within the testing functionality of the rule builder. 

Problem is- that there are some classifications that just aren't making sense and they are in the wrong classification buckets for our campaigns/creative elements and I'm about to do a massive overhaul and maybe look at historicals to see if it was either changes to the rule set or if it was something that was overlapping/incorrect rule within the set (by just using the testing feature with every tracking code type/variation that I can find).


Before I do all of this, was curious if anyone had a good guide, tool or some helpful advice as this is going to be quite a big job and a lot of work will be needed so I want to make sure to do it right or in the best fashion possible.  Thanks in advance!

1 Accepted Solution

Avatar

Correct answer by
Level 9

I don't know of any 3rd party tools out there that do what you are asking.

However.. I know you mentioned testing within the rule builder isn't what you are looking for, but based on what you are asking for, it sounds like maybe you aren't fully aware of what all it does?  Because the rule tester does in fact do what you are asking (see details below).

I mean, it's not great. Firstly, it's a popup that toggles on hover, so it's hard to copy/paste to somewhere else. Also, it gets hard to read when you have a lot of rules, or if Match Criteria (e.g. regex pattern) values are lengthy.  And there's definitely no export to file button that will dump it all (including the popup info) into a convenient spreadsheet or something.

But... it's better than nothing. Anyways, here are details about it, for posterity.

Determine which Rule Generated a Value

There is a Test Rule Set button where you can test your rules and see which one wins for a given value.

Example:

7paZnXU.png

In this example I have 3 rules setup:

  1. First one is to set a default value "default value"
  2. Second one is to set value to "contains foo"  if the value contains "foo"
  3. Third one is to set value to "starts with foo" if the value starts with "foo"

Then, I click on the Test Rule Set button to go to the Classification Rule Builder Test page:

wtqIAyI.png

On the left side is a Sample Keys textarea, where you can copy/paste keys you want to test.  In my example, I have the following keys:

some page

some foo page

foo some page

some other page

Next, click the blue Run Test button. This will generate the columns to the right, which show the generated values for the classification columns.

Finally, hover over the table cell for a given value, and you will see a popup of which rule(s) matched the key.  Rules are evaluated from top to bottom, and last one matched wins.

Some examples from the above:

ND6erSf.png

naSDsLi.png

a79HOoz.png

.josh

View solution in original post

2 Replies

Avatar

Correct answer by
Level 9

I don't know of any 3rd party tools out there that do what you are asking.

However.. I know you mentioned testing within the rule builder isn't what you are looking for, but based on what you are asking for, it sounds like maybe you aren't fully aware of what all it does?  Because the rule tester does in fact do what you are asking (see details below).

I mean, it's not great. Firstly, it's a popup that toggles on hover, so it's hard to copy/paste to somewhere else. Also, it gets hard to read when you have a lot of rules, or if Match Criteria (e.g. regex pattern) values are lengthy.  And there's definitely no export to file button that will dump it all (including the popup info) into a convenient spreadsheet or something.

But... it's better than nothing. Anyways, here are details about it, for posterity.

Determine which Rule Generated a Value

There is a Test Rule Set button where you can test your rules and see which one wins for a given value.

Example:

7paZnXU.png

In this example I have 3 rules setup:

  1. First one is to set a default value "default value"
  2. Second one is to set value to "contains foo"  if the value contains "foo"
  3. Third one is to set value to "starts with foo" if the value starts with "foo"

Then, I click on the Test Rule Set button to go to the Classification Rule Builder Test page:

wtqIAyI.png

On the left side is a Sample Keys textarea, where you can copy/paste keys you want to test.  In my example, I have the following keys:

some page

some foo page

foo some page

some other page

Next, click the blue Run Test button. This will generate the columns to the right, which show the generated values for the classification columns.

Finally, hover over the table cell for a given value, and you will see a popup of which rule(s) matched the key.  Rules are evaluated from top to bottom, and last one matched wins.

Some examples from the above:

ND6erSf.png

naSDsLi.png

a79HOoz.png

.josh

Avatar

Level 3

wow, this was a bit of work with this explanation and screenshots- it is most appreciated on the detail on all fronts!  You're right, I definetely don't completely understand it but I definetely got some nuggets out of this.  This makes a lot of sense and if I'm understanding this right, it does a top to bottom test and grabs the last rule for attribution for the classification?  That could very well mean that there could be some overlapping occuring and maybe why some are getting bucketed incorrectly then if thats the case.  This list I'm going through is fairly large and I adopted it when I got hired, so I've been trying to figure out what/where the problems are occuring and this was extremely helpful.  Thanks Josh!