Event Decision Criteria
A Web Realtime decision’s Event decision criteria allow you, through their use within a smart asset, to present web page content accordant with RPI’s knowledge of the web events with which a visitor is associated. Such web events include standard events, such as page visits, form submissions and link clicks, and custom states and metrics, captured following execution of scripts at (typically) an RPI landing page.
Custom web events are defined using web events adapters, which are managed at the Web Adapters configuration interface, and which can be associated with landing pages (for more information, please see the Configuration and Landing Page Designer documentation). To use custom web events in a web decision, you need to select a Web events adapter. For more information, please see the Web Realtime decision documentation.
The Form Submission, Link Click and Page Visit standard web event types are available irrespective as to whether a web events adapter has been selected at the Realtime decision. Configuration settings RulesWebLinkClicks and RulesWebPageVisits can be used to specify value lists to be used when selecting values for Link Click and Page Visit criteria, respectively.
If a web events adapter has been selected, any metrics All/Any states that it contains are also listed. in addition, the standard scorecard and User defined decision criteria types are also available.
The following properties are displayed at event decision criteria in edit mode:
![image-20240520-103225.png](../__attachments/3904938549/image-20240520-103225.png?inst-v=c3007bf4-8f91-43d3-9633-90859273c945)
Event Name: read-only.
Matches Values: this property allows you to specify whether values provided are to be matched exactly, or if are to be contained anywhere within the supplied Event Detail. A dropdown, it exposes values “Within” (the default) and “Exactly”.
Event Detail: clicking the property displays the Specify Values dialog, in which you can provide one or more values with which to configure the criterion.
When Happened: this property allows you to specify when the form submission happened (or didn't happen). A dropdown provides access to the following values:
Happened anytime (the default)
Has never happened
Happened in the last/Didn't happen in the last: if one of these values is selected, the Time Frame property is shown.
Latest: at evaluation, the criterion is satisfied when the event is the latest of its type to have occurred. If Event Detail is provided, it must be the latest within the context of the selected Event Name.
Occurrences: this property allows you to specify the number of times the event happened or didn’t happen. A range of operators is available.
Time Frame: this property is shown if Operator is set to one of “Happened in the last” or “Didn't happen in the last”. Days, hours, minutes and seconds can be specified.
Note that the RPI Realtime API web.config setting NoDaysPersistWebEvents
controls the time period for which web event data is stored in the Realtime cache.
You can refine an event criterion by adding event metadata criteria. These allow you to respond to very specific occurrences – for example, the addition of a specific type of product to a shopping cart.
![](../__attachments/3904938549/att_22_for_3864789100.png?inst-v=c3007bf4-8f91-43d3-9633-90859273c945)
A Realtime Event Metadata Criteria section is shown at bottom of the event criterion editor. It allows you to specify additional criteria to further refine the event criterion. It contains the following:
All/Any
Add New Criterion: you can add event metadata criteria based on an event metadata-enabled attribute list specified at the selected web events adapter. Custom event metadata criteria are also supported.
Event metadata criteria
Note that RPI Realtime appsettings setting MaxNoEventMetadataInstances
controls the maximum amount of event metadata that can be stored per event.
When in read-only mode, an event decision criterion appears as per the following example:
![](../__attachments/3904938549/att_11_for_3864789100.png?inst-v=c3007bf4-8f91-43d3-9633-90859273c945)
If refined with additional event metadata criteria, the criterion is shown like this:
![](../__attachments/3904938549/att_12_for_3864789100.png?inst-v=c3007bf4-8f91-43d3-9633-90859273c945)