Applying Rules to Audits and Journeys

Overview

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.

Add or remove rules to be assigned to the audit in the Rules tab.

1Apply rules that you want to run on this audit by clicking "add to list." 


2 If you have labeled your rules, you can add multiple rules at the same time by label. 


3 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.

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.

The option to reprocess rules for an audit only applies to rules that were saved on the audit for that run. 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. Reprocessing rules does not apply to rules that have been added to the audit configuration since it was last run. In that case, the entire audit must be re-run in order for the rules to be executed.

The option to reprocess rules is found on the ellipses inside the audit report on the upper right corner of the screen. It only applies to rules that were applied on an audit but have changed since it was run.

See User-Defined Rules Reporting in Help for information on reading and interpreting rules in audits.

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.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.