How targeting works
Every Zenstep flow has a targeting configuration — a set of rules that determine whether the flow should be shown to the current user on the current page. The targeting engine runs client-side in the browser (inside the Zenstep snippet) every time a page loads or the URL changes (SPA navigation). This means:- No server round-trip per evaluation — instant decision
- Rules are evaluated against the current browser context (URL, user attributes, device, behaviour)
- Targeting is evaluated against all published flows simultaneously
Anatomy of a targeting rule
Every rule has a type and evaluates totrue or false. Rules are combined with and (all must match) or or (any must match) logic.
/dashboard and only to users with plan = "free".
Rule types
Combining rules
Rules are combined at two levels:- Top-level operator (
and/or) — how the rules in the root array are combined - Group rule — a nested rule that can contain its own rules and operator
/pricing OR (on any dashboard page AND if the user is on the free plan).
Environments
You can restrict a flow to specific environments (staging vs production):data-env on the snippet script tag:
Frequency controls
Targeting determines if a flow is shown. Frequency controls determine how often:
Frequency is set per-flow in the flow editor, not in targeting rules.