Skip to main content

Installation

Or include via CDN:

userpilotSettings Object


Getting Started

To use the SDK, ensure it is loaded on your page. Then, you can call the available methods on the userpilot object.

Methods

identify(userId, )

Identifies the current user with an ID and optional properties.

anonymous()

Assigns a session-based unique ID for the current user on public pages.

reload()

Updates Userpilot content when the page state changes.

track(name, )

Tracks a custom event for the current user.

triggerById(contentId)

Forces specific Userpilot content to show for the current user.

on(event, callback)

Registers a callback for a Userpilot event.

Event Examples

off(event)

Removes a callback function attached to an event.

once(event, callback)

Registers a callback to be triggered only once.

end()

End the currently running flow.

clean()

Clears Userpilot storage and session data.

destroy()

Fully clears Userpilot storage and removes all active content.

suppress()

Fully stops Userpilot operations on the SDK side.

unsuppress()

Resumes SDK operations.

Parameters