Depending on how your personalizations are coded on your website, you will have various ways to connect with EmotionsAI in order to target your audience on EmotionsAI segments:
Front-end personalizations
If your personalization is front-end, you simply have to read the localStorage and display conditions according to the segment
Example:
if(atob(localStorage.getItem('dotaki.need'))=="Safety"){
// code to display the right personalization
}
Back-end personalizations
If your personalization is back-end, you have two options:
- AB Tasty can push the user’s segment to your API using the user ID. In that case, AB Tasty will create a personalized tag for you to make it work.
- You can recover the data from the front (using localStorage) and push it to your backend API.
Once your data is retrieved from the backend, you can generate your HTML page according to the user segment.