Note

  • This feature is available in Pro, Expert and Enterprise plans.
  • Custom properties must be configured by someone with developing skills.

Introduction

Custom properties allow you to target your visitors by custom properties -properties that you set up yourself.

Let's say that we want to target visitors who:

  • are older than 25 years old,
  • are in the "travel" segment or in the "sport" segment,
  • and purchased something at least 3 days ago.

On your website, you can attach such properties to your visitors, so WisePops will be able to target these properties.

Data attached to your visitors are called Custom Properties.
Rules based on custom properties are called Custom Conditions.


Defining Custom Properties

You can use JavaScript to attach custom properties to a visitor. A function wisepops() is available as soon as our tracking code is executed.

wisepops("properties", customProperties, [reset]);
  • "properties" : String that indicates that you want to define custom properties. Leave it as it is.
  • customProperties : this is the dictionary of properties you know about the user, like email, name, age, etc.
  • reset (optional) : By default, the custom properties are persistent. You don't need to write them on each page. If you do not want to keep previously stored properties, you can enter true as the 3rd parameter.

Typically, when someone logs in, we will add the following code, right after the WisePops tracking code:

wisepops("properties", {
    firstName: "Boris",
    country: "FR",
    age: 30,
    segments: "cinema,food,travel",
    lastPurchaseDate: "2017-05-02T15:52:01+02:00"
});

Defining Custom Conditions

To define your custom conditions, open your popup in the editor and click "Display Scenarios". Then, select "Custom Conditions".
Then you can set up the conditions to be matched during the display scenario resolution: 

Formats of Custom Properties

The custom properties dictionary must be a 1 dimension object.
Each value must be one of the following types:

  • String
  • Number
  • Date

About the Date type and format

You can set up a property to the current date of the browser by doing:

wisepops("properties", {lastPurchaseDate: new Date()});

But you are also free to write dates as strings.
While various formats are handled, we suggest you follow the W3C standard:
2017-05-02T15:52:01+02:00
.
This is equivalent to 2017-05-02 15:52:01 CEST .
If no timezone is specified, dates will be handled as UTC.

Debugging and troubleshooting

If the wisepops() function is not defined, please make sure that the WisePops tracking code is up to date.
It should start by (function(W,i,s,e,P,o,p) .

You can also test your configuration.

Did this answer your question?