Skip to main content
All CollectionsCustomizations
How can I use Tolstoy Rules & Triggers for Widgets?
How can I use Tolstoy Rules & Triggers for Widgets?

Have total control over your widgets' location, based on your preferred rules and triggers.

Dov Kaufmann avatar
Written by Dov Kaufmann
Updated over 11 months ago

Learn how you can set up a unique logic for your widget, to determine exactly where

your widget will appear on your site, and who will be able to see it.

To access the Rules section, navigate to the Tolstoy you want to edit. You'll see it in the upper toolbar.
โ€‹


Pages Rules

The pages rules dictate where your widget will appear on your site. The conditions are based on specific URLs or keywords.

Let's explore our operators!

Any value - basically means "Set to all pages". The widget will appear on all URLs of the site, except for URLs you specifically excluded in other rules. If your widget is set to live without any rules at all, it will also be set to all pages.

Equals to - means that the widget will appear in that exact URL, no digit more or less.

Not equals to - the widget will be excluded from that exact URL.

Starts with - the widget will appear at any URL that begins with the inserted value, regardless of what comes after.

Ends with - the widget will appear at any URL that ends with the inserted value, regardless of what came before.

Contains - the widget will appear on any URL that includes the inserted value.

Does not contains - the widget will not appear on any URL that included the inserted value.

In - can be used when you want to include multiple "Equals to" rules on the same widget. It can be a list separated by a comma.

Not in - can be used when you want to include multiple "Not equals to" rules on the same widget. It can be a list separated by a comma.

Bear with us! Here's an example.

Let's say that I have a clothing store, and I made a widget that I want to add to my homepage, to the entire shirts category and to any product that contains the word pink.

The widget will appear on the homepage, because it is set to appear on a value that is equal to my homepage URL. It will also appear in any URL that starts with www.mystore.com/shirts, due to the Starts with operator. Lastly, it would appear on any URL that Contains the word "pink".


Event Triggers

Exit Intent

With the Exit Intent rule, your widget will pop up and expand when your visitors show intent of leaving, to catch their attention and encourage them to stay on your site. The widget will appear when the user will bring their mouse to the upper part of the window.

Show after will make your widget appear with a delay.


Audience Rules

You are also able to set up conditions based on who is visiting your site and set different rules that will apply to visitors or users.

Visitors' rules apply before any login data was entered into the site - could be more relevant to no-login websites. The visitor attributes are taken from the viewer's visit - so session count, last seen at, first seen at, play count, and impression count are the available attributes.

Users' rules apply for websites after the login. In order for it to work, you will need to connect your user base using an Identify function as explained in this guide. They include all the visitors' attributes, plus two unique attributes, which are user email and sign-up date.

Visitors Attributes

Session count - the widget will/won't be visible according to the number of visits of your users.

Last seen at - conditions will be set according to date the visitor has been last seen.

First seen at - conditions will be set according to date the visitor has been first seen.

Play count - conditions will be set according to the amount the visitor played the Tolstoy.

Impressions count - conditions will be set according to the amount the visitor landed on the page with the Tolstoy.

User Attributes

The user attributes are the same the the visitors', but with two additional conditions:

Email - conditions will be set according to the user email.

Signed up at - the widget will or will not appear for certain clients, depending on their sign up date you will choose.

You can also check this developer article to add your own custom visitor attributes, or contact us at support@gotolstoy.com to help you set them up.

Let's explore some useful conditions for these attributes!

Example 1: I have a special feature available only to customers from the MySite company, who all have the @mysite.com email handle. I want the widget to only be visible to them.

Example 2: I made a huge system update on my site on July 21th 2022, and I have a new widget explaining the changes. It may not be relevant for new clients, as they were not familiar with the previous system. However, older clients may need some guidance in order to readjust to the new system. That's why I set the widget to be visible only for clients who have registered before the update.

Example 3: I want to include a special widget for clients on their first sign-up day, which offers them a discount code at the end. That's why I set up a widget to only be visible to clients on their first day of sign-up.

Example 4: I made a special widget welcoming back visitors who've returned to the site after 30 days they didn't visit it.

Example 5: I made a special widget for old customers who joined more than a year ago, which offers them a discount code.


That is it! You can completely customize the widget's location to your preference.

Have any questions? Feel free to send us a note at support@gotolstoy.com.

Did this answer your question?