Rules are the foundation of analytics validation within ObservePoint. They allow you to automatically verify that your tags and variables are firing correctly across your digital properties.
You can find all of the rules in your account by selecting Tag & Variable Rules under Standards in the left-hand navigation.
Tag & Variable Rules Library
The Rules Library is the central hub for your validation logic. This is where you can create and edit rules.
Setting Up or Editing a Rule
Rule logic has two main components
The optional WHEN section, this is where you put criteria that must be present for the rule to be evaluated. For example, use a regular expression to only apply this rule to product pages, or when a specific page or tag status code is present. If the criteria is not matched this rule would be displayed as "Not Applied" in our various reports.
The required EXPECT section, here you will specify how tags, data layers, and variables should be set.
The EXPECT section is made up of one or more conditions which provide the logic for a "pass" or "fail" result.
Step 1 - Pick a Tag or Data Layer
Choose the specific tag(s) this rule should monitor. If choosing a Data Layer, the data layer name is the account identifier.
Step 2 - Define Variable(s) and Values
Most rules will have one or more variable conditions. The editor includes several tools to streamline configuring variables:
Smart Autocomplete: When entering a Variable or Value, the system provides a dropdown list filtered specifically for the tag you selected in Step 1.
Smart Defaults: If you select an "Equals" operator, the system automatically selects the "String" type to reduce manual steps.
Duplicate Conditions or Tags: Use the Duplicate icon to instantly clone an existing condition—ideal for rules requiring similar logic across multiple variables.
Reorder with Drag-and-Drop: Use the handle on the left of any condition block to drag it into your preferred order.
The following operators can be used when configuring conditions.
Operator | Definition |
Equals | The value of the variable exactly matches the value that the user inputs. |
Does not equal | The value of the variable does not match exactly the value that the user inputs. |
Contains | The value of the variable has a portion or all of the value that the user has input. |
Does not contain | The value of the variable does not contain any portion of what the user has input. |
Is set | The variable and its value must be present to pass. |
Is not set | The variable is missing or the variable is present and the value is missing. |
Regex | The value of the variable matches the regular expression defined by the user. |
>= | The value of the variable is greater than or equal to the value the user has input. Note that only a numerical value will be correctly evaluated. Use the string selector for this operator. |
<= | The value of the variable is less than or equal to the value the user has input. Note that only a numerical value will be correctly evaluated. Use the string selector for this operator. |
Regular Expressions in Variable Names
A variable name can also be represented with a regular expression when you check the Match as RegEx box under the variable name. This can be useful when trying to create rules to test an array of elements or a single element that is not the first element in an array.
Example #1: A variable name such as ^v[0-9] would allow us to test variables with letter v followed by any number e.g. v1, v3, v9, etc.
Example #2: A variable name of dl.events.[[0-9]].type would allow us to create a rule for any item in a data layer array.
Step 2a: Define a Variable Value
Often you will specify specific values for each variable, they can consist of any text or regular expression. Use regex101.com set to Java 8 to test regular expressions.
Note: Make sure that the variables/values added in the rules are exactly as they are shown in the Audits/Journeys. For example, eVar8 would be v8. Extra spaces after the variables/values names will lead to failed rules.
Variable Value Option: Advanced Variable Value Mapping
Variable values can be mapped to other data points which include, query strings, other tags, and data layers.
URL Query String Parameter
The rule will look for whatever you enter in the Value field in the query string of the page. If the parameter is found, the rule will compare its value to the value of the variable. For example, suppose you want to validate the landing pages that populate the Adobe Campaign variable (v0). Assuming the following URL, setting the Value field to cid will look for aff_1234 as the value of the campaign variable:
Data Layer
Choosing Data Layer will look for the value of a data layer element and compare it to the value of the item defined in the Variable field. For example, configure a rule to check if a product display page sets the style number of the item in the pv_a10 variable with the following settings:
Variable: pv_a10
Operator: contains
Selector: Data Layer
Value: digitalData.product.productInfo.styleNumber
Tags
It is not uncommon for web page variables to get their values from another variable on the page. To validate in this scenario, choose a tag and set the Value field to the name of a variable that belongs to that tag. For example, use the following settings to confirm that Adobe Analytics eVar1 is the same as the value of prop1:
Variable: v1
Operator: equals
Selector: Adobe Analytics
Value: c1
A Special Note About Using Multiple Tag Conditions
If you add more than one expected result in the same rule, each result must be met for the rule to pass. If any condition is not met, the entire rule fails and the report shows which one failed. Create another expected section if you need to create criteria for a separate tag instance.
Easily Assign Rules to Audits and Journeys
Assigning a rule to an Audit is as simple selecting one or more items from the list on Step 3 on the rules setup screen. Journeys are little more involved because rules need to be be assigned to individual actions. Assign these rules action by action as needed.
