How to Target Visitors Using Custom Properties

 

In Qualaroo, you can show a survey to individuals based on your database. It is called Custom Property Targeting.

 

With custom property targeting:

 

  • You can design surveys for users who meet specific conditions.

  • You can drive highly targeted responses.

 

You can understand custom property targeting based on this:

 

For instance, you want to display a survey only to users who made a purchase in the last 30 days and only when the shopping cart contains precisely 2 or more items. 

 

In this case, the “number of items” and “has purchased in the past 30 days” are custom targeting properties, where 2 and “yes” are their respective required targeting values.

 

How to Set Custom Properties in a Survey

You can set any number of custom properties in the Qualaroo survey 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 you are likely to use for targeting surveys in the future. 

 

This way, you will not have to ask your developers whenever you want to use a new property for targeting. 

 

You can set custom properties by following these steps:

 

In the TARGETING tab, 

  • Scroll down to Target: Advanced

  • Select “When passed custom property is matched.”

 

Enable the "Custom Property Matched"; targeting setting

 

Usage

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 purchased in the 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"

 

Types of Regular Expressions to Set Custom Properties

 

Let's break down the expression into smaller pieces:

 

  • Brackets are used for group operations. Operations inside brackets have higher precedence.

  • num_items, purch30, premium are variable names. They will be replaced with content provided in JavaScript.

  • Variable names can be letters, numbers, and an _ characters.

  • -, >, and = are examples of operators. =, >, <, != are currently supported.

  • - and together with or are boolean operators. You can combine them to achieve flexibility.

  • Strings should be under quotations.

 

Enter custom property in the box

 

Seed With Empty Values

Enabling this option will set each property as null, allowing for proper firing without all properties being present on your site’s particular page or a section.

 

Adding JavaScript to Your Site

If we were to use the first example of targeting those who purchased in the past 30 days when their cart contained two or more items, or they were 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 the purchase has been made in the last 30 days>,
‘premium’: <code for whether the user has a premium account>
}]);
</script>

 

This code is added directly beneath the main Qualaroo JavaScript.

 

Important Points:

  1. Continuing with the above example, you can now specify your custom targeting requirements in the Targeting tab of your survey. 

  2. 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.

  3. 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 only if the values of all targeting parameters match their respective actual values.

  4. Custom requirements are applied in addition to the standard ones. It allows you to target surveys based on typical conditions and custom properties specific to your business.

 

And that's it! If you encounter any issues or have any questions, don't hesitate to reach out to our support team. 

 

 

© 2005 - 2024 ProProfs
-
add chat to your website