Skip to main content
How to create a Rule
Luiza Gircoveanu avatar
Written by Luiza Gircoveanu
Updated over a week ago

Overview

Rules help you validate your data by looking for tags, variables, values (such as an individual page name), or by confirming a variable matches a pattern. In simpler terms, they are the parameters that you set around an Audit to help you extract the most important information for your company. Without Rules, Audits don’t have the same value or power. You’d simply be collecting data. So let’s dive into the basics of Rules.

How to create a Rule

To begin, we’re going to cover the basics of creating a Rule beginning with navigating to the Tag & Variable Rules menu. This menu provides you with a list of all of the rules that have been created in your account. You can also see which Audits and Journeys each Rule has been applied to, who created the Rule, when it was created, and when it was last modified. To get to this menu, simply select Tag & Variable Rules under Standards in the left-hand navigation bar.

Once you have arrived at the Tag & Variable Rules menu, follow these steps to create a Rule:

  1. Click the “Create New Rule” button in the top right corner

  2. Give your rule a descriptive name to easily identify its purpose.

  3. Select the tag or variable you want to create the rule for.

  4. Choose the conditions that must be met for the rule to trigger.

  5. Configure any additional settings or parameters for the rule.

  6. Save the rule to activate it.

Conditions Tab Overview

Rules contains two similar but very specific parameters, filters and conditions. A filter specifies when a condition should be validated. A condition describes how a tag or variable should be configured on the page.

Rules use IF/THEN logic to determine when a rule should run and the criteria for success. The IF condition controls when the rule should be executed while the THEN condition defines the expected results of the rule. The logic goes like this:

  1. If the filter criteria is met

  2. Then the data collected on the page should match the condition in the expected result

  3. Otherwise (if the filter criteria is not met) the data collected on the page should match the condition for the optional result

For more information on the specifics of creating Rules and navigating the Tag & Variable Rules menu, click here.

Rules to include

Below we have listed a few of the Rules we believe are important for your site:

  1. Page Load Rules: Ensure that essential technologies fire correctly on page load.

  2. Analytics on Every Page: ensure that you have proper tags on all pages

  3. Event-Based Rules: Verify that tags are triggered appropriately based on specific user interactions or events.

  4. Data Layer Integrity Rules: Validate the integrity and consistency of data passed through the data layer.

  5. Cross-Domain Tracking Rules: Confirm that tracking across multiple domains functions correctly.

  6. Cookie Consent Rules: Validate compliance with cookie consent regulations by ensuring tags are activated only after user consent.

For further questions about Rules or setting up a specific Rule, contact your Customer Success Manager. You can also check out some of our additional resources:

Did this answer your question?