The ability to target based on custom properties is part of our Growth and up plans.
The Qualaroo survey targeting tab supports many conditions that can apply to any website. The ability to show a survey to individuals based on your database is a feature that proves valuable to many of our customers. At Qualaroo, we call this Custom Property targeting.
For instance, you might decide to display a survey only to users who made a purchase in the past 30 days and only when the shopping cart contains exactly 2 or more items. In this case, the “number of items” and “has made a purchase in the past 30 days” are custom targeting properties, where 2 and "yes" are their respective required targeting values.
Setting custom properties in survey
To set custom properties you can use simple expressions. Let’s extend our example from the beginning of the article by another condition: We want our customers to have 2 items in the basket or be premium customers, and display a nudge only if they made a purchase in last 30 days.
The snippet below is how custom properties for such requirements should be built:
(num_items > 2 or premium = "yes") and purch30 = "yes"
To break down the expression into smaller pieces:
- Brackets are used to group operations. Operations inside brackets have higher precedence.
- variables names can be made of letters, numbers and an _ characters.
- - > and = are examples of operators. =, >, <, != are currently supported.
- - and together with or are boolean operators. You can combine them together to achieve flexibility.
'num_items': <code for # items purchased>,
'purch30': <code for whether purchase has been made in last 30 days>,
'premium': <code for whether user has premium account>
Continuing with the above example, now you can specify your custom targeting requirements in the Targeting tab of your survey. You can set the values any number of times during the visit, on page load or after the page loads. Every time you set a new value, Qualaroo will check again if a survey should be displayed.
Now that your developers have tagged visitors with the actual value of the properties, and you have specified the required values in the configuration UI, Qualaroo will compare the actual values with the required values. The survey will show up only if the values of all targeting parameters match their respective actual values.
Custom requirements are applied in addition to the standard ones. This allows you to target to surveys based on the combination of standard requirements and custom properties specific to your business.