I have a requirement to show the content, based on user's type/category. So, I'm planning to go with cookie approach and achieve this. But, can someone help me on the approach which I'm gong to follow and correct me if something will not works here!
1) My application has login option. so, when user logged in I will set a cookie whether the user category is A, B or C. (CookieName=UserCategory & CookieValue=categoryA/B/C).
2) Once the cookie has been set and I will trigger the mbox/At.js and In Target I will check the cookie (UserCategory) whether if it is A, B or C? Based on that I'm planning to show the content.
Now, I had a doubts on how to set the cookie first (before calling mbox/at.js) and how to pass the cookie value to Target. And, where should I write the JS/JAVA code to fetch the cookies?
Whether this cookie approach will works or not?
Or, is there any other approach I can use it from OOTB?
I using AEM 6.4 and integrate Target within that.
Can you please suggest/help me here. Thanks in Advance.
vijayselvaraj_90 Instead of using a cookie the easier approach would be to store the category value in the user's visitor profile or pass it as an mbox parameter and then use that build the audience to show your content. Information on the same can be found at Methods
Or if you want to set cookie and that too before firing target then you have to on the webpage with the help of web developers and should set set cookie when user logs in and once that is set then you can create a profile script and read the cookie value and then same profile script you can use in your custom audience.