Trigger rules — page, visitor and time conditions

Updated May 22, 2026

You have written the campaign. Now you need it to reach the right person at the right moment, and nobody else. Every engagement campaign — banner, chat message, survey and product tour — uses one shared panel for that. Open any campaign and click Trigger.

The panel is called Trigger settings and has four question blocks and one dropdown: When to trigger, Page rules, Time on page, Visitor rules and Frequency. Leave a block empty and it places no restriction.

When to trigger

This is the only block that is required — a campaign with nothing here never fires. Add one or more events; if you add several, any one of them can fire the campaign.

Event Timing options Fires when
Session On session start · After session start A visit begins. A new session starts after 3 hours of inactivity. "After session start" waits a delay you set, and keeps counting even if the visitor moves to another page.
Page view On page view · After page view The visitor opens a page. "After page view" waits a delay you set, again continuing across navigation.
Custom event Trigger · Always trigger Your own site reports that something happened. You type the event name into the rule. "Always trigger" ignores the frequency setting; plain "Trigger" respects it.

Product tours are the exception: a tour has no Session event, only Page view and Custom event.

Sending a custom event

Your developer adds one line where the thing happens. The first argument is always the literal word customEvent; your own name goes in name:

Yaplet.trackEvent('customEvent', { name: 'your-custom-event' });

Then type that same name into the rule.

Page rules

Page rules limit the campaign to certain addresses. The rule is called Current page and you pick one comparison:

Comparison Example Matches
Equals / Does not equal https://app.example.com/dashboard That exact address, and nothing else.
Contains / Does not contain /pricing Any address with that text anywhere in it.
Starts with / Does not start with https://app.example.com/ Any address beginning that way.
Ends with / Does not end with /checkout Any address finishing that way.
Matches pattern https://app.example.com/projects/*/settings A pattern where * stands for any text. Handy for addresses with an id in the middle.
Matches regex ^/blog/\d+$ A regular expression, ignoring upper and lower case.

A trailing slash is ignored on both sides, so /pricing and /pricing/ are treated as the same address.

Tours do not have this block. A tour gets its pages from the Start URLs you enter when you build it, which use the same * pattern matching.

Time on page

One condition: More than a number of seconds or minutes. It means time on the page the visitor is on now — if they navigate away before the time is up, the count starts again on the new page.

That is the difference between this and the "After page view" delay above: the delay keeps running wherever the visitor goes, while time on page resets on every navigation.

Visitor rules

These restrict the campaign to a particular kind of visitor. Add as many as you like:

Rule What it looks at
Country The country Yaplet detects from the visitor's connection. Equals or does not equal, chosen from a list.
Email · Name · External ID · Plan · Value What you told Yaplet about the person with Yaplet.identify(). External ID is your own customer id; Value is a number you attach to them, such as their account worth.
Visitor ID Yaplet's own id for the visitor. Mostly used to test a campaign on yourself.
Signed up When Yaplet first saw this visitor. Before or after a date, or more or less than a period ago.
Last seen Their most recent activity, on the same date comparisons. Good for reaching people who have been away a while.
Session count How many visits they have made. Session count equals 1 is a first-time visitor.
Banned Whether you have blocked them. Is true or is false.

Text rules offer Equals, Does not equal, Contains, Does not contain, Starts with, Does not start with, Ends with, Does not end with, Is set and Is not set. Session count, the one numeric rule, offers equals, does not equal, more than and less than.

How the rules combine

Each block has a word at the top that decides how its conditions add up. AND means every condition must be true; OR means any one is enough.

  • When to trigger is always OR — any listed event fires the campaign.
  • Page rules start on OR, which is usually what you want: "on this page or that page".
  • Visitor rules start on AND. Switch the group to OR and you may add one nested group inside it, which is how you write something like (Germany or Austria) and plan is trial.

When two campaigns qualify at once

Only one banner, one chat message, one survey and one tour can fire from the same event — they never stack. If several of the same kind qualify, Yaplet shows the one with the highest Priority, which you set from the campaign list.

Testing a campaign on yourself first

At the bottom of the Trigger settings panel there is a Set up test for yourself button. It opens your website in a small window, reads your own visitor id from the widget, and rewrites the trigger to fire on every page view for that id only. Publish, check the campaign looks right, then put the real trigger back.

What's next?

Set how often the same person can see the campaign in Frequency caps, or go back to the format you are building: chat messages, banners, tours or surveys.

Did this article answer your question?