Cookie preferences of a customer

To access the cookie preferences of a customer from the customer record in NetSuite, the SuiteCommerce Analytics Data feature must be enabled. This method retrieves a list of key/value pairs representing the cookie names and their corresponding boolean values (true or false), along with the last date the customer updated the preferences. It’s important to note that this method only applies to logged-in website visitors; if the visitor is not logged in, the method returns null.

var userProfile = container.getComponent('UserProfile');

userProfile.getCookieOptions().then(function(cookieOptions) {
console.log(cookieOptions)
})

Leave a comment

Your email address will not be published. Required fields are marked *