I have a question. I am using Target Standard to create A/B test. In this test I need to pass a value from the page into Target – Once the page loads I need to get the value from a cookie and pass it to Target. I will then need to use this value to create audience segments so that I can segment audience for the test based on the value stored in the cookie.
I am able to get the value from the cookie and so my question is - can I pass this value into Target? If so could you please enlighten me as to how it is done?
If you are trying to send this along with the target-global-mbox call, then you can read the cookie inside targetPageParams function and return the value from the function to send as an mbox parameter in target-global-mbox. Since this is a change on the website page, It would be easy to do if you use any Tag management system like DTM.
If you wish to send the value after a user has entered a campaign, then inside the offer code, you can fire a custom mbox using mboxDefine/mboxUpdate with the cookie value as a parameter and then create an audience based on that.
Hi Shekhar, may I know how can we achieve this. I am using targetPageParams function to pass parameters but if I read it correctly this has to pass before the target call. In my case I want to pass datalayer values/site catalyst values to target-global-mbox but those are updated after DOM ready.