Applying Rules to Audits and Journeys
A rule applied to an audit or journey helps you validate that your data is collecting as expected. While your account may show dozens or hundreds of rules defined, they must be applied to specific audits or journeys for them to be useful.
The edit screen for an audit or journey has a tab for assigning rules. In web or app journeys, the tab is called Journey Rules, for audits it is simply called "Rules".
Applying Rules to Audits
To assign rules to a new web audit that you are creating, you must click the Advanced Setup button at the bottom of the edit screen. Then click on the Rules tab. If you are editing an already existing audit, the Rules tab is already present at the top of the screen.
Apply rules that you want to run on this audit by clicking "add to list."
If you have labeled your rules, you can add multiple rules at the same time by label.
Create a rule on the fly without leaving your audit setup. When you save the new rule, it will be added to the audit and saved in the rule library.
ObservePoint makes it easy to create rules based on data that is found during a previous audit. In your audit, drill down to the page-level details (you can do this by selecting any of the URLs found on almost all audit reports). Once there, select the Tags tab, find the tag you would like to build a rule out of, and select Create Rule. This will bring up a modal, which allows you to select the variables and values that you would like to include in your rule. Rules created using this in-audit rule creator will not have any 'If conditions' and will be applied to every page after the audit is re-run or the rules are reprocessed.
The rules will execute only on the pages or under the conditions defined in the rule setup, if any. Rules without conditions defined execute on every page. Any changes made to a rule which existed on the audit before its last run can be re-applied to the existing data without re-running the audit. After an audit runs, you can also apply new rules to the audit and select Reprocess Rules to test the audit's results against the rules' conditions. Reprocessing Rules is much faster than re-running the audit entirely, so this can save you a lot of time.
Applying Rules to Journeys
Rules can be applied to both web and app journeys unless the rule has a URL or status code condition defined. Therefore, when applying rules to journeys, only rules without URL or status code conditions will show in the list.
There are two places that a rule can be applied in journeys: on a step and at the global level (journey rule). A rule that executes on a step will succeed if the result criteria are met at any time during the step. A rule that is applied globally will succeed if the rule criteria is met at least once during the entire journey. This is useful, especially for apps that batch tags to fire at intervals rather than on specific screens.
In most cases, you want to apply the rules at a step level. You do so by going to the journey steps while editing the Journey or you can go to the journey report and create a rule ad-hoc based on the results of a run by clicking the Add Rule button.
This will give you a pop-up where you can determine the rule name and select variables you want to validate. (Note: If you checkmark the variables and click "Add Rules" the rule will test for that exact variable value. So if the value is something that changes frequently you'll want to go in to customize the rule.)
Later if you have a rule that fails because it didn't have the expected value and you want to update that rule to actual value you can also do that from the journey report. In the case below if set as expected, my rule would now check to see that on this step event6 fires not event7.
See Journey Rules Reporting for information on reading and interpreting rules in journeys.