In the Conditions section of a Rule, you may select from a number of Condition Types to specify when a Rule will be executed (performing all the Rule Actions). This allows you to customize how your site displays based on the behavior and attributes of the front-end user.
Condition Descriptions
The table below lists and describes each of the condition types available. See the parameters table farther down the page for more granular information on each entry.
Condition Name | Description |
---|---|
Browser | Identifies the user's browser from the user agent in the request header, and compares it with the browser specified in the Condition. |
Browser Language | Identifies the language the visitor has selected in their browser by inspecting the request header, and compares it with the lmaguage specified in the Condition. |
Current URL | Compares the current URL (the URL of the page on which the rule is being evaluated) with the URL specified in the Condition.
|
Device Type | Identifies the type of device being used by the visitor from the user agent in the request header, and compares it to the device type specified in the Condition. |
Has Visited URL | Inspects a dotCMS maintained list of visited URLs in the current session to determine if a user has or has not visited a specific URL on your site during their current session. |
HTTP Method | Evaluates the whether or not a request is using a particular HTTP Method, such as GET , POST , etc. |
Logged In | Evaluates whether or not the user is currently logged in, and compares it to the login status specified in the Condition. |
Number of Previous Visits | Finds the number of times the user has visited the site previously by inspecting site visitation “cookies” stored on the visitor's device, and compares it to the numeric value specified in the Condition. |
Number of Visits | Finds the number of times the user has visited the site by inspecting site visitation “cookies” stored on the visitor's device, adds 1 (for the current visit), and compares the result to the numeric value specified in the Condition. Note: This value includes the current visit, so it is equal to Number of Previous Visits + 1. |
Pages Viewed | Inspects the dotCMS clickstream to count the number of pages viewed by the user in the current session, and compares it to the value specified in the Condition. |
Persona | Compares the visitor's currently assigned Persona](visitors#AssignedPersona) with the Persona specified in the Condition. |
Referring URL | Finds the Referring URL of the visitor from the request header, and compares it to URL specified in the Condition. |
Request Attribute | Finds the value of the specified attribute in the request header and compares it to the attribute value specified in the Condition. |
Request Header | Finds the specified value in the request header and compares it to the header value specified in the Condition. |
Request Parameter | Finds the specified parameter in the request and compares it to the parameter value specified in the Condition. |
Selected Language | Identifies which dotCMS configured language](configuring-languages) (if any) a user has selected, and compares it with the language specified in the Condition. |
Session Attribute | Finds the value of the specified attribute in the current session and compares it to the attribute value specified in the Condition. |
Visitor Operating System | Identifies the user's operating system from the user agent in the request header, and compares it with the operating system specified in the Condition. |
Visitor's Country | Uses GeoIP2 services to identify the visitor's country based on the visitor's IP address, and compares it to the country specified in the Condition. |
Visitor's Date-Time | Uses GeoIP2 services to identify the visitor's date and time based on the visitor's IP address, and compares it to the date and time specified in the Condition. |
Visitor's Location | Uses GeoIP2 services to approximate the visitor's geolocation based on the visitor's IP address, and compares the visitor's geographical distance from the target geolocation with the distance specified in the Condition. |
Note:
- This product includes GeoLite2 data created by MaxMind, available from maxmind.com.
- The version of the MaxMind GeoIP database that ships with dotCMS is the GeoLite2 free version, which has limited location resolution and is licensed for development purposes only.
- The GeoIP libraries that ship with dotCMS may be easily upgraded to a more accurate GeoIP database.
- If you wish to use the MaxMind GeoLite2 database for your production site, or if you wish to perform more accurate geolocation of users based on the user's IP address, you must contact MaxMind and meet all MaxMind requirements for registration or purchase of an appropriate license.
Condition Parameters
The following table displays the required parameters and accepted comparisons for each of the condition types, and the format or value that can be analyzed for each condition.
Condition Name | Parameters | Comparison | Type | Format or Value |
---|---|---|---|---|
Browser | None | Is, Is not | Selection | Selections: IE, Edge, Safari, Firefox, Chrome, Opera |
Browser Language | None | Is, Is not | Selection | Selected Language (or enter any value) |
Current URL | None | Is, Is not, Starts with, Ends with, Contains, regex | Text | URL (Please Note: For the “Is”, “Is not”, and “Ends with” comparisons, URL values ending in a / will automatically reference the CMS_INDEX_PAGE property for the folder. For example, somefolder/ will be treated as somefolder/{CMS_INDEX_PAGE}. References to folders without the trailing / will not automatically reference the CMS_INDEX_PAGE page property.) |
Device Type | None | Is, Is not | Selection | Selections: Computer, Mobile, Tablet, Wearable computer, Digital media receiver, Game console |
Has Visited URL | None | Is not, Starts with, Ends with, Contains, regex | Text | URL |
HTTP Method | None | Is, Is not | Selection | Selections: DELETE , GET , HEAD , OPTIONS , PATCH , POST , PUT |
Logged In | None | Is, Is not | None | N/A |
Number of Previous Visits | None | Is equal to, Is less than, Is greater than, Is less than or equal to, Is greater than or equal to | Integer | Number of previous visits (not including the current visit) |
Number of Visits | None | Is equal to, Is less than, Is greater than, Is less than or equal to, Is greater than or equal to | Integer | Number of visits (including the current visit) |
Pages Viewed | None | Is equal to, Is not equal to, Is less than, Is greater than, Is less than or equal to, Is greater than or equal to | Integer | Number of pages |
Persona | None | Is, Is not | Selection | Select a Persona from the list of Personas defined on the system. |
Referring URL | None | Is, Is not, Exists, Starts with, Ends with, Contains, regex | Text | URL |
Request Attribute | Attribute Name | Is, Is not, Exists, Starts with, Ends with, Contains, regex | Text | Attribute Value |
Request Header | Any standard (or custom) header name | Is, Is not, Exists, Starts with, Ends with, Contains, regex | Text | Header Value |
Request Parameter | Parameter Name | Is, Is not, Exists, Starts with, Ends with, Contains, regex | Text | Parameter Value |
Selected Language | None | Is, Is not | Selection | Select from a list of languages configured in dotCMS |
Session Attribute | Attribute Name | Is, Is not, Exists, Starts with, Ends with, Contains, regex | Text | Attribute Value |
Visitor Operating System | None | Is, Is not | Selection | Select from a list of Operating System values supported by the User Agent Viewtool |
Visitor's Country | None | Is, Is not | Selection | Selected Language (or enter any value) |
Visitor's Date-Time | None | Is between, Is greater than, Is less than | Date and Time | Enter the Date & Time or Select from the Calendar |
Visitor's Location | Redius in miles/kilometers | Within, Not Within | Location | Set the location using the visual map |