What conditions to trigger a form are available?

What conditions to trigger a form are available?

Mopinion offers a wide variety of conditions that can be used to trigger a feedback form.

 

Show only to a percentage of users

By adjusting the percentage of users one can set what percentage of your page visitors will see the feedback form. By default, when the toggle is disabled, this condition is applied to all page visitors.

Show based on URL conditions

One can chose to trigger based on a ‘contains' or a ‘does not contain’ statement. Both AND and OR logical operators are available for this condition. One can also use a regular expression (regex) for more precise URL targeting. One can use websites such as regex101 to help you form your regular expression.

chrome_3j9mqvsTeM.png

Show to users coming from a specific page

One can chose to trigger based on a contains or does not contain statement. You can use an OR logical operator for this condition if needed. One can also use a regular expression (regex) for more precise URL targeting. One can use websites such as regex101 to help you form your regular expression.

chrome_YaMc0sEghn.png

This condition uses an OR condition, if you want to check against multiple URLs simultaneously then you can use regex for this

Show form after a specific time on the page

One can set the form to be delayed by a number of seconds. The timer starts once the user opens the page that the form is on.

chrome_DzZERuNRGs.png

Show form after a specific time when all conditions are valid

This condition is the same as the one above, however the timer will only start once all of the conditions are valid.

chrome_AhyfIwTlwu.png

Show form after a specific time on the entire website

This condition checks that the user has spent at least x seconds on the entire website.

chrome_dDrqD9ylbR.png

Show on a specific date

One can pick between the following four operators when specifying the date(s) that the form should trigger on.

chrome_lcIfqUjBI3.png

When using ‘between’ you can pick a date range to target, for example a month.

chrome_CBaBy8NAeP.png

Show on a specific time

Along with the date, you can also trigger based on the time of day. You can pick from the following operators.

chrome_lcIfqUjBI3.png

This condition uses the 24 hour clock.

chrome_57PL5wcx49.png

Show only to either new or returning visitors

One can target new or returning visitors. A user is firs determined as a new visitor on their first visit. If after visiting the website ,they leave the website and then return within two minutes, they will still be counted as a new visitor. However, if they leave the website for longer than two minutes and return later, they will be considered a returning visitor.

chrome_5qJOKRdGdy.png

Show to users after visiting a specific amount of pages

This condition checks that the user has visited at least or at most a number of pages on the website.

chrome_leprbbMaS2.png

Show only to visitors using a certain device

One can also target one or more types of device.

chrome_NJxX45MKM9.png

Show form after the user scrolls to a certain position

This condition will trigger if the user scrolls a certain amount of pixels or a percentage of the page, which can be from the top or bottom.

chrome_FNbKLugL5t.png

Show based on the users cookies

With this condition, one can use the presence or absence of cookies and/or cookie values to show a form.

The condition has five operators.

The trigger has the possibility to combine multiple conditions with AND and/or OR statements.

Example

We will use an example to explain how the operators and statements can be used. Suppose your website places a cookie with the name color, which can have the values red, light red, dark red white, blue, light blue, dark blue, green, light green, or dark green. Also, a cookie with the name figure which can have the values circle, or square can be placed.

exists

Use this operator if you want to show a form when a specific cookie is present regardless of its value. E.g. if the cookie color is placed in the visitor’s browser, set the condition to color exists to trigger the form. The condition does not require a value.

In our example, the condition will evaluate to true if the cookie color is present.

 

does not exists

Use this operator if you want to show a form when a specific cookie is not present regardless of its value. E.g. if the cookie color is not present in the visitor’s browser, set the condition to color does not exist to trigger the form. The condition does not require a value.

In our example, the condition will evaluate to true if the cookie color is not present.

 

contains

Use this operator if you want to show a form when a specific cookie has a value that contains a specific string. E.g. if the value of the cookie color in the visitor’s browser has a value that contains the string blue, set the condition to color contains blue to trigger the form.

In our example, the condition will evaluate to true if the value of the cookie color is blue, dark blue, or light blue.

 

matches exactly

Use this operator if you want to show a form when a specific cookie has a specific value. E.g. if the value of the cookie color in the visitor’s browser has the value blue, set the condition to color matches exactly blue to trigger the form.

In our example, the condition will evaluate to true if the value of the cookie color is blue. It will evaluate to false for the values red, light red, dark red white, light blue, dark blue, green, light green, and dark green.

does not contain

Use this operator if you want to prevent a form from showing when a specific cookie has a value that contains a specific string. E.g. if the value of the cookie color in the visitor’s browser has a value that contains the string light, set the condition to color does not contain light to prevent the form from triggering when the value is light blue, light red, or light green.

 

In our example, the condition will evaluate to true if the value of the cookie color is red, white, blue, dark blue, dark red, green, or dark green It will evaluate to false for the value light blue, light red, or light green.

and

Use the AND statement to combine multiple cookies and/or cookie values. Both conditions need to be true in order to show the form.

In our example, the condition will evaluate to true if 1. the value of the cookie color is light green, light red, or light blue AND 2. the value of the cookie figure is circle.

or

Use the OR statement to combine multiple cookies and/or cookie values. Only one of the conditions needs to be true to show the form.

In our example, the condition will evaluate to true if 1. the cookie color is present OR 2. the cookie figure is not present.

and & or

Use the AND & OR statement to combine multiple cookies and/or cookie values.

In our example either the condition combination A or B needs to be true to trigger the form. In order for the condition combination A to be true the cookie color needs to 1. contain the string dark and 2. does not contain the string red and 3. the cookie figure needs to match the string square exactly.

In order for the condition combination B to be true the cookie color needs to 4. contain the string light and 5. does not contain the string blue and the cookie figure needs to match the string circle exactly.

Show based on JavaScript variables on the page

How do I trigger a form based on a JavaScript variable?

Show based on HTML elements on the page

With this condition, one can use the presence or absence of an HTML element and/or HTML element values to show a form.

chrome_IYIDmProbp.png

As seen above, with this trigger one can combine multiple conditions with AND and/or OR statements.

The condition has five operators.

chrome_Hh61r8zssR.png

For the exists and does not exist operators, one does not need to enter an element value.

One example of an element you can use, is a class.

When referencing a class, start with a . and replace any spaces in the class name with a . as seen below.

 

chrome_ClvxhR3x13.png

 

chrome_xgMKOR6X3K.png

Show based on interaction with feedback forms

With this condition you can trigger a form based on how a user has interacted with other forms.

You can pick between three options, form shown, form closed and form completed. You can combine these conditions using AND/OR operators.

chrome_cnfJIoe2je.png

Show based on interaction with the page

Here you can trigger a form based on how the user has interacted with the page, for example if they have clicked a button.

You can pick between three different interaction types, clicked, hovered and received input. You can combine these conditions using AND/OR operators.

Below is an example to trigger when a button has been clicked on.

chrome_nUPxd0v8VV.png

Copy the class name of the button. When referencing the class, start with a . and replace any spaces in the class name with a .

chrome_AbOxjuz0ZL.png

Related content