- 12 Mar 2024
- 2 Minutes to read
Data Layers
- Updated on 12 Mar 2024
- 2 Minutes to read
Data Layers trigger your campaign based on the values in Insider Object (e.g. Insider Object - contains - email_optin - true).
When you are setting the rule for personalizations, select Data Layers > Insider Object.
After you select "Insider Object", select an operator.
- For String values, you can use "contains", "is exactly", and "does not contain" operators.
- For Numeric values, you can use "is greater than", "is less than", "is greater than or equal to", "is less than or equal to", and "is equal to" operators.
- For Boolean values, you can use "is" and "is not" operators.
Below are some examples for each data type:
String type
A string stores a series of characters like "John Doe". A string is a text value denoted in double or single quotes.
For example, you would like to target when "name" under the "user" key is "jack". Then you need to set the rule as follows:
So you can use a nested structure for targeting.
Numeric type
For example, if you'd like to target the "stock" key for the product object, for this case the setting should be like this:
Boolean type
When a Boolean value is checked, when you choose the operator as:
- is: The value associated with the key is expected to be true.
- is not: The value associated with the key is expected to be false.
If you would like to use a boolean-type key, you need to enter the key for which you want to check whether it is true or not.
For example, if you want to target when the "user.sms_optin" is true, then you need to set the rule as follows:
In this case, if the value of "user.sms_optin" key is false, the rule won't match and the campaign will not be displayed.
For example, if you want to target when the "user.gdpr_optin" is false, then you need to set the rule as follows:
In this case, if the value of "user.gdpr_optin" key is false, the rule will match and the campaign will be displayed.
Notes
- Since there is no validation on InOne for key and value parameters, you are highly suggested to pay attention while preparing the rules. If you wrongly write the keys or values, they won't match with Insider Object and your campaign won't be displayed.
- Insider object must be defined before the Insider tag. Otherwise, Insider tag cannot read this information from Insider object and the campaign will not be displayed as the rule would not match.
Use Cases
- You can show a Smart Recommender campaign based on genders.
- You can show responsive onpage campaigns for your opted out users to win them back with a coupon code.
- You can show membership-based discount campaigns for your registered users with the related keys and values for retention.
- You can show a responsive layout banner messages based on the stock amount.
- You can launch Social Proof campaigns based on the number of products left in stock.