Rulesets in Digioh

A ruleset is a group of rules that can be added to a lightbox or widget as a single item.

This is handy for storing commonly-used display conditions, allowing you to quickly add them to lightboxes and edit the rules for these lightboxes from a single place.

This document will cover:


To create a ruleset, go to your Boxes page and select More, Rulesets.

Select New Ruleset.


You will be prompted to give your new ruleset a name.

Click on the ruleset name to add new rules to it.

After adding your rules, click Save and Publish.

Go back to the Boxes page, and open the conditions for one of your widgets. You’ll see the Rulesets option in the the list of rules.


Add the Ruleset rule to your widget, then select the ruleset you want to add.

Your new ruleset is now up and running on a widget!


Best Practices

For more advanced use cases, 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 Lightbox 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, bbut 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.



Creating a Suppression List

Rulesets make it easy to suppress more than one widget under a specific set of circumstances.

First, create a new ruleset Then, add the suppression rules you want to use. For example, to keep multiple widgets from showing up on your about, privacy, and return pages, you might set up something like this:


When you finish adding rules to your suppression list ruleset, add the ruleset to any widget the suppression list should apply to.

You can edit rulesets at any time. If you want to add or remove specific URLs to this suppression list, they will automatically be applied to all boxes with this ruleset.