Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

ExplainWith this condition, you 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.

Easy html macro
theme{"label":"solarized_dark","value":"solarized_dark"}
contentByMode{"html":"<div id=\"surveyContent\"></div>","javascript":"var confluenceData = {};\nvar pageId;\nvar pageTitle;\n\ntry {\n confluenceData = JSON.parse(parent.window.name);\n var pageId = confluenceData.options.productContext['page.id'];\n var pageTitle = confluenceData.options.productContext['page.title'];\n} catch(e) {}\n\nvar src = 'https://collect.mopinion.com/assets/surveys/2.0/js/survey.min.js';\n\nvar vars = {\n key:'c004128f86438276805d25759a236cc56a170dd5', \n domain:'demo.mopinion.com', \n divName:'surveyContent', \n button:false, \n use_collect:false, \n useQuerySelectorAll:false\n};\n\nvar s = document.createElement('script');\ns.async = 'async';\ns.id = 'mopinionFeedbackScript';\ns.src = src;\ns.onload = s.onreadystatechange = function() {\n if (!s.readyState || s.readyState === 'loaded' || s.readyState === 'complete') {\n try {\n srv.loadSurvey(vars);\n } catch (e) {}\n }\n}\ndocument.head.appendChild(s);","css":""}