Use Trigger Conditions
Conditions narrow a trigger after its event type and type-specific settings match.
For example, a DOM Ready trigger can listen for page readiness and then use a
condition such as Page Path equals /thank-you. A click trigger can first match
a clicked element and then use conditions based on clicked URL, clicked text,
page host, Nitoriq click ID, data-layer values, or other fields.
Before you start
- choose the trigger type and type-specific settings first
- know which page, event, click, form, referrer, Nitoriq, or data-layer field should be checked
- know which operator should compare the field
- know whether the condition value is fixed text, a number, a list, a regex, or
a
{{variable_name}}template
Add trigger conditions
Open the trigger
Open the container, choose Triggers, then edit the trigger.
Enable conditions
In Conditions, choose Conditions.
When No conditions is selected, the trigger relies only on its trigger type
and type-specific settings.
Select the field
Choose the field the condition should read.
Supported field groups include:
Page: page URL, path, hostname, and query parametersReferrer: referrer URL and hostNIQ: click ID, visitor ID, visit ID, campaign ID, and workspace IDData Layer: Nitoriq data-layer pathsEvent: event name, event type, and event value keysClick: clicked element ID, classes, text, URL, tag, and targetForm: form ID, target, URL, and text
Wildcard fields such as Page Query Param, Data Layer, and Event Value
show an additional input for the query parameter name, data path, or event
value key.
Choose the operator
Choose how the field should be compared.
Supported operators include equals, does not equal, contains, does not contain, starts with, ends with, matches regex, in list, not in list, exists, does not exist, greater than, greater than or equal, less than, and less than or equal.
Enter the value
Enter the expected value when the operator needs one.
For In list and Not in list, enter comma-separated values. For Exists and
Does not exist, the value field is disabled.
Condition values can use templates such as {{order_id}} or
{{niq_click_id}}. The runtime renders the template when the trigger event is
evaluated.
Add more rules
Use Add condition to add another rule.
The current editor fires the trigger when all listed rules are true.
Condition examples
Page Path equals /thank-you
Matches a page path after the trigger event happens.
A page trigger can be narrowed to one path.Page Query Param utm_source exists
Matches when the named query parameter is present.
Wildcard query fields let the condition name the exact query key.Clicked Element URL contains example-offer.com
Matches a click event by the clicked link URL.
Click triggers can be narrowed by the link that was clicked.Data Layer purchase.value greater than 0
Matches a value pushed into the Nitoriq data layer.
Data-layer paths let the trigger use structured page or event state.Event Value order_id exists
Matches a custom event payload key.
Custom-event triggers can check values pushed with the event.Conditions are configured when
- the field exists in the event context the trigger listens to
- wildcard fields include the query name, data path, or event value key
- the operator matches the kind of comparison
- list operators use comma-separated values
- templates reference existing variables or built-in variables
- all listed rules describe the context required for the trigger to match
Was this page helpful?