The ability to target based on custom properties is part of our Premium plan.
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
You can notify Qualaroo of the value of any number of custom properties with the JavaScript API. Think of this as tagging a visitor with a name/value pair. This step requires your developers to update your page’s code, so you might want to tag visitors with all the possible name/value pairs that you are likely to use for targeting surveys in future. This way you will not have to ask your developers every time you want to use a new property for targeting. You can set custom properties in Targeting tab, after checking “when custom property is matched under Advanced”.
Usage
Dashboard
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.
- num_items, purch30, premium are variables names. They will be replaced with content provided in JavaScript.
- 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.
- Strings should be surrounded by quotations.
Seed with empty values
Enabling this option will set each property as null initially, allowing for proper firing without all properties being present on a particular page or section of your site.
JavaScript on your site
If we were to use the first example of targeting those who made a purchase in the past 30 days when their cart contained 2 or more items or them being premium users, the additional JavaScript you would want to add to your site would look something like this:
<script type="text/javascript" charset="utf-8">
_kiq.push(['set', {
'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>
}]);
</script>
This code is added directly beneath the main Qualaroo JavaScript.
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.
Comments
0 comments
Article is closed for comments.