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
  • 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.allowUserTracking(options)
  • Syntax
  • Parameters
  • Returns
  • Example
Consent Management

Allow user tracking

Was this page helpful?
Previous

Deny user tracking

Next
Built with

wf.allowUserTracking(options)

Enables user tracking for the current user.

Syntax

1wf.allowUserTracking(options?: { reload?: boolean; activate?: boolean }): void

Parameters

  • options: object - Controls activation behavior. All properties are optional.
    • reload: boolean - Reloads the page after activating tracking. Default: false
    • activate: boolean - Activates tracking immediately. Default: true

Returns

This method doesn’t return a value to the caller.

Example

1// Ensure Browser APIs are ready before calling
2wf.ready(() => {
3 // Enable user tracking and activate immediately
4 wf.allowUserTracking({ activate: true });
5});