Ruleset Best Practices

What You’ll Learn in This Article:

  • Ruleset best practices

Rulesets are a powerful feature of Digioh box conditions that allow you to:

  1. Put commonly used conditions in a single place for robustness and ease of maintenance
  2. Give more human-readable names to complex or technical conditions for ease of understanding
  3. Easily implement campaign group suppression
  4. Easily express A AND (B OR C) type logic
Abstracting Common Conditions

If the same set of conditions is used over and over in multiple boxes, put them in a Ruleset with a good human readable name, e.g. “Standard Box Conditions”. This makes the box-level conditions leaner, easier to understand, and maintainable.

Hiding Technical Detail

Rulesets are a great way to hide technical detail and make box conditions easier to understand and maintain. For example, this rule is impossible to understand without knowledge of the inner workings of the site:

HTML Exists jQuery NOT equals div[data-type=fcf1]

Simply wrap that condition in a Ruleset and now we have:
Ruleset Is False "Is First Click Free Article"

In general, you should avoid putting an HTML Exists, JavaScript, Cookie, or Local Storage directly in box conditions, always wrap it in a human-readable Ruleset. This is easier to understand, and also if the underlying implementation changes, you can easily update it in one place.

Suppression of multiple CTAs with the Same Action

This is common in publishing but exists elsewhere too. Let’s say you have a newsletter Daily Recipes, and you have 5 boxes with different creatives that all sign up for the same newsletter. So we need to suppress all 5 boxes if any one of them submits. For each of the 5 boxes, you could set 4 other box-is-not-submitted conditions, and this-box-is-not-submitted. It’s cumbersome, error prone, and can be tricky to find the right boxes and understand what’s going on when you are looking at box conditions.

Instead, you have a single Ruleset “Is Subscribed to Daily Recipes” that has all 5 boxes not submitted, which you configure as a single NOT rule in each box. Easy to read, understand, and maintain.

Flexible OR Conditions

The basic Digioh conditions builder allows you to create conditions with OR logic. However, if your list of conditions for a box is large, you may have to copy a lot of the same conditions into the OR block. Here’s a simplified example based on a URL OR Cookie, but imagine that you have dozens of additional conditions:

The Displays per Visitor condition and UTM condition are copied and now have to be maintained in two places. Instead, we can create a Ruleset:

And replace the original box conditions like this:

We are now concisely expressing (URL checked out OR cookie checked out) AND facebook AND 1 per session in a single block, without copying conditions.

Updated on March 3, 2025
Was this article helpful?

Related Articles

Need Support?
Can't find the answer you're looking for?
Contact Support