1. When should you use custom variables?
When you want to display your messages to one specific segment of your visitors. Custom variables give you the power to base your audience segmentation on any variable you define.
This feature has been proven useful when there is additional information about your visitors that can be used to group them into different audience segments.
2. Why should I use custom variables?
Custom variables give you the ability to present highly-tuned messages to specific audience segments.
For instance, an eCommerce site can use previous orders or items viewed as custom variables. These custom variables trigger specific messages related to those orders and items. This is an excellent way to encourage repeat business or generate buzz for a new product offering.
3. How do I set up my site for OptiMonk to retrieve my custom variables?
4.What code do I need for OptiMonk to retrieve the data on my custom variables?
A real-life example could look like this:
In the example above two custom variables have been defined:
- "registered" and "hasorder"
with the values:
- "yes" and "no"
To remove a custom variable, use the following method:
5. Some important details to note when inserting the code
- The name of the variables cannot include special characters
- Variables are case sensitives
- The OptiMonkOnReady function should be defined only once, i.e. - only one time per page.
- OptiMonk.Visitor exists only if there is at least one active campaign on the domain
6. How do I set up my OptiMonk campaigns to use my custom variables?
- Login to your OptiMonk account at https://app.optimonk.com/login/en
- Go to “Campaigns”
- Select the campaign you want to use your customer variables
- On “Settings summary” click on “Edit settings”
- Go to the “Select who should see the popup” page
- Click on “Add new condition”
- Scroll down to “Customer variable” and click on the plus sign
The following 4 parameters should be set up for each rule:
- The name of the variable
- The type of the variable: text or number.
- The method of comparison: equals, doesn’t equal, contains, doesn’t contain, is set, isn’t set
- Which value it should be compared to
The value of [named] variable, which is a text, equals yes.
If you have any further questions or need any help, please contact us at firstname.lastname@example.org, we would be happy to assist you :)