Page Rules

Page rules are essential for managing and experimenting with individual or groups of distinctive URLs. They allow you to define how different pages should behave under certain conditions, which is particularly useful for experimentation.

Creating Page Rules

To create a new page rule, navigate to the Page Rules section on the organization sidebar and click on “Create Page Rule.” In the modal that appears, you can set a descriptive name and description, along with a preview URL. The preview URL is used to preview experiment changes. You can then create as many rules as you need by selecting a rule type and defining its value.

Rule Types

There are three types of page rules you can create:

Substring Match

  • Description: This rule type checks if the current URL contains a specific substring.
  • How to Create: Select “Substring Match” as the rule type and enter the substring you want to match against the URL.
  • Example: If you want to match any URL containing “dashboard”, set the rule value to “dashboard”.

Exact Match

  • Description: This rule type checks if the current URL exactly matches a specified URL.
  • How to Create: Select “Exact Match” as the rule type and enter the exact URL you want to match.
  • Example: To match the homepage URL exactly, set the rule value to ”https://www.example.com/”.

Regex Match

  • Description: This rule type uses a regular expression to match the current URL.
  • How to Create: Select “Regex Match” as the rule type and enter a valid regular expression.
  • Example: To match any URL ending with “.html”, set the rule value to \.html$.

Recommendations

We recommend creating page rules for all main pages where experimentation will take place, such as Home, Dashboard, and Product Single. You can also create a page rule on the fly when setting up an experiment if you don’t need to reuse it.

By using these page rules, you can effectively manage and control the behavior of your web pages during experiments, ensuring that your tests are accurate and reliable.