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:
Click the “Create New Rule” button in the top right corner
Give your rule a descriptive name to easily identify its purpose.
Select the tag or variable you want to create the rule for.
Choose the conditions that must be met for the rule to trigger.
Configure any additional settings or parameters for the rule.
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:
If the filter criteria is met
Then the data collected on the page should match the condition in the expected result
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:
Page Load Rules: Ensure that essential technologies fire correctly on page load.
Analytics on Every Page: ensure that you have proper tags on all pages
Event-Based Rules: Verify that tags are triggered appropriately based on specific user interactions or events.
Data Layer Integrity Rules: Validate the integrity and consistency of data passed through the data layer.
Cross-Domain Tracking Rules: Confirm that tracking across multiple domains functions correctly.
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:
Applying Rules to Audits and Journeys | OP Help Center
Alerts & Rules | TipJar