Web intercept triggers
You can use triggers to decide when your web intercept shows. Without triggers, the intercept shows when the page loads, after the Delay you set. With triggers, Ethnio waits for something to happen on the page first. That can be a click on a button, a visitor who stays a while, a burst of angry clicks, or a visitor who's about to leave.
⚠️ Triggers only work in the study editor
Studies built in the legacy editor don't have a Triggers tab.
Targeting vs. triggers
The two work together:
- Targeting decides who can see the intercept, by URL, device, browser, operating system, location, and embedded data. Read more about targeting for intercepts.
- Triggers decide when those visitors see it.
Ethnio checks targeting, the cookie, and the Display interval first. Triggers only watch the page for visitors who pass all three. Everyone else won't see the intercept, no matter what they click.
How it works
- The first trigger that matches wins. Let's say your study has a Time on page trigger and an Exit intent trigger. Whichever happens first shows the intercept, and the other one stops watching.
- The Delay starts after the match. The Delay on the Options tab still applies. It counts from the moment a trigger matches. For most triggers, you'll want to set it to immediately.
- No triggers means no waiting. If the Triggers tab has no triggers, the intercept shows after the page load and the Delay, like it always has. If you delete the last trigger, the intercept shows on page load again.
- You can add up to 10 web intercept triggers to a study.
Add a trigger
- Open your study and head to Publish. Choose Web Intercept, or Both intercept and study link.
- Open the Triggers tab, right after Targeting.
- Click Add trigger.
- Under Type, pick one of the five types. Each one has a short description under its name.
- Fill in the settings for that type. The text under the settings explains how they work.
- Click Save.

Each trigger you save shows up as a short line, like Time on page, after 30 seconds. Use the edit and delete buttons next to it to change or remove it.
Once a trigger is saved, you can change its settings but not its type. To use another type, add a new trigger. The Triggers tab shows how many triggers your study has, and every change shows up in the study's Revision History.
If you publish the study as Both intercept and study link, the web intercept and the app intercept each get their own Triggers tab. The web tab only lists web intercept triggers. App intercepts work a bit differently. Read more about app intercept triggers.
The five trigger types
| Type | When it matches | Settings |
|---|---|---|
| Click on an element | A visitor clicks a link, a button, or another element. | CSS selector (optional) and Text on the element (optional). Fill in one or both. |
| Time on page | A visitor spends a number of seconds on one page. | Seconds, from 1 to 3,600. The default is 30. |
| Time on site | A visitor spends a number of seconds on your site, across one or more pages. | Seconds, from 1 to 3,600. The default is 60. |
| Rage click | A visitor clicks the same spot fast, 4 times or more. | CSS selector (optional). Leave it empty to count clicks anywhere. |
| Exit intent | A visitor moves the pointer out through the top of the window, or scrolls up fast on a phone. | Minimum seconds on page, from 0 to 3,600. The default is 5. |
Click on an element
The intercept shows after a visitor clicks an element that matches your CSS selector, your text, or both.
- CSS selector (optional): for example
#start-trialor.pricing-card button. You can use more than one selector. Just put a comma between them. - Text on the element (optional): for example
Start free trial. Ethnio looks at the text of the link or button that was clicked. If the click wasn't on a link or button, it looks at the clicked element. It's a match when that text contains yours. Upper and lower case don't matter, and neither do extra spaces. - If you fill in both, the click has to match both.
⚠️ Pick an element that doesn't open a new page
If the click opens a new page, the browser leaves before the visitor sees the intercept. And if the Delay is immediately and the Cookie is on, the cookie can still get set. That visitor then won't see the study again. Buttons that open a menu, a modal, or a tab on the same page work best.
Time on page
The intercept shows after a visitor stays on one page for this many seconds. Only time with the tab visible counts. If the visitor switches to another tab, the count pauses. In a single-page app, the count starts over when the path changes, for example from /pricing to /checkout .
Time on site
The intercept shows after a visitor spends this many seconds on your site in one browser tab. The time can add up across several pages. A few things to know:
- Only pages where this intercept can show add time. Those are pages with the Ethnio code where the study's targeting matches.
- If the Display interval is less than 100%, the count can skip some of these pages.
- A new browser tab starts at 0. If the visitor is away for 30 minutes or more, the count starts over.
- Just like Time on page, only time with the tab visible counts.
Rage click
The intercept shows 1 second after a visitor clicks one spot 4 times within 1 second. It's a good way to reach people who are frustrated with something that won't respond.
- Clicks on text inputs and sliders don't count.
- Clicks on buttons like +, -, >, or Next don't count either. People click those fast on purpose.
- Fast clicks that select text don't count.
- If you leave the CSS selector empty, clicks on any element count. Add a selector to watch just one part of the page.
Exit intent
Exit intent tries to catch visitors right before they leave:
- On desktop, the intercept shows when the pointer leaves the page through the top of the window. That's where the tabs, the address bar, and the close button are.
- On phones and tablets, there's no pointer, so a fast scroll up counts instead. It only counts once the visitor has scrolled down at least one screen.
- Exits before the Minimum seconds on page don't count. That way a visitor who leaves right away won't get the intercept.
Set the Delay to immediately for exit intent. A visitor who's leaving won't wait for it. Exit intent also needs the Welcome page turned on. Without it, the intercept can't show before the visitor leaves.
Warnings on the Triggers tab
Once your study has triggers, the Triggers tab warns you about settings that work against them:
- The Delay isn't set to immediately. The tab tells you how long after a match the intercept will show. To show it right when a trigger matches, set the Delay to immediately on the Options tab.
- You use an Exit intent trigger. The Triggers tab reminds you that exit intent on phones and tablets also catches visitors who scroll up to reread something. There, a fast scroll up counts as exit intent.
- You use an Exit intent trigger and the Welcome page is off. Exit intent won't work until you turn on the Welcome page toggle on the Design page.
Try your triggers in the preview
The web intercept preview runs your study's real triggers. You'll see them listed at the top left of the preview page.
| Type | How to try it in the preview |
|---|---|
| Click on an element | The preview shows a screenshot of a site, not your real page. So it ignores the CSS selector and the text, and a click anywhere on the page matches. |
| Time on page | Wait for the seconds. Switching to another browser tab pauses the count. |
| Time on site | The preview has only one page, so it works like Time on page. |
| Rage click | Click one spot 4 times within 1 second. The intercept shows 1 second later. |
| Exit intent | Wait for the minimum seconds, then move the pointer out through the top edge of the page. The phone view works the same way. You're still using a mouse. |
Keep in mind that clicking Initial popup in the list of pages still shows the invite right away. Simulate delay under Options decides whether the Delay runs after a match. To test your CSS selector or text for real, turn on a test study on your own site and click the element there.
Tips for CSS selectors and button text
- Ask your developer for a stable selector. An id like
#start-trialor a test attribute like[data-test="start-trial"]works best. Avoid class names that look random, like.css-1x2y3z. They can change with every release of your site. - Find a selector yourself. In Chrome, right-click the element and pick Inspect. In the panel that opens, right-click the highlighted line and pick Copy › Copy selector. Long selectors with lots of
>signs break easily. Shorten them to the part that's unique. - No good selector? Use the text. Type the words on the button in Text on the element (optional), like
Add to cart. You don't need any code for this. Short, distinctive text works best. The element only has to contain your text. Common words can match more than you want. - Translated site? The text has to match the language the visitor sees. A CSS selector works in every language.
- Combine them. Let's say you use the selector
.pricingand the textUpgrade. Only the Upgrade button in your pricing section will match.
Good to know
- Study views on the Publish page still count every visitor who loads the study, even the ones whose triggers never match. So a study with triggers can have lots of views and fewer invites.
- In a single-page app, Ethnio checks URL targeting when the page loads. After a route change, a trigger can still match and show the study, even on a route that your URL targeting leaves out. Read more about single-page apps.
- Clicks inside the Ethnio intercept, including the invite, never count toward a trigger.
Troubleshooting
The intercept never shows.
Check targeting, the Display interval, and the cookie first. They decide before any trigger starts watching. Then make sure the selector or the text matches the element on your live site. The preview doesn't check them.
The intercept shows a while after the click.
The Delay counts from the match. Set it to immediately on the Options tab.
Exit intent shows too often on phones.
That's the fast scroll up rule at work. Raise the Minimum seconds on page, or use Time on page instead. To still reach visitors on phones, make a copy of the study for phones. Give it device targeting and a Time on page trigger.
Still need help? Reach out to help@ethn.io and we're happy to help.