Browser API
Interact with a visitor's browser
wf.getAllAttributes()
Retrieve all attributes that have been previously stored using setAttributes().
setAttributes()
1wf.getAllAttributes(scope: 'user' | 'pageview')
'user'
'pageview'
1// Call the wf.ready() function the Browser API is available2wf.ready(function() {3 // Set attributes for the current user4 wf.setAttributes('user', {5 userSegment: 'enterprise',6 userRole: 'technicalBuyer'7 })8})910// Retrieve the attributes11const attributes = wf.getAllAttributes('user')12 console.log(attributes)
An object containing all attributes set for the current scope.
1{2 "userSegment": "enterprise",3 "userRole": "technicalBuyer"4}