For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Resources
Get started
ReferenceChangelog
ReferenceChangelog
  • Browser API
    • wf.ready()
  • Consent Management
    • Get consent status
    • Allow user tracking
    • Deny user tracking
  • Optimize
    • Quickstart
    • Variations
    • Custom attributes
      • Get attributes
      • Get all attributes
      • Set attributes
      • Delete attributes
      • Delete all attributes
  • Custom Goals
    • On-site conversions
    • Off-site conversions
  • Data Exports
    • Data destinations
    • Data schema
  • Additional Resources
    • Support Documentation
LogoLogo
Resources
Get started
On this page
  • wf.deleteAllAttributes(scope)
  • Syntax
  • Parameters
  • Example implementation
  • Returns
OptimizeCustom attributes

Delete all attributes

Was this page helpful?
Previous

Custom Goals

Next
Built with

wf.deleteAllAttributes(scope)

Delete all custom attributes for the current user or page view. This method removes previously set attributes from storage.

Syntax

1wf.deleteAllAttributes(scope: 'user' | 'pageview')

Parameters

  • scope: 'user' | 'pageview' - The scope of the attributes. You can choose to set attributes for the current user or the current page view.

Example implementation

1// Call the wf.ready() function the Browser API is available
2wf.ready(function() {
3 // Set attributes for the current user
4 wf.deleteAllAttributes('user')
5})

Returns

This method doesn’t return a value. It only deletes the specified attributes from storage. To see updated attributes, use wf.getAttributes().