Skip to main content
The browser SDK stores audience identity, user properties, and in-progress study session references locally so users can resume where they left off. These session APIs are part of the @trypillow/web browser package.

Reset on logout

Call reset() when the current user signs out.
await sdk.reset();
reset() clears the external ID, removes stored properties, and rotates the SDK to a fresh anonymous audience session.

Restart the active study

Call clearSession() when you want the currently presented study to start over.
sdk.clearSession();
This clears the saved in-progress study session and reloads the hosted study fresh inside the widget shell.

Control the widget

After presentStudy(...), you can control the shell directly:
sdk.close();
sdk.toggle();
Use these methods when you want to hide or restore the active hosted study without destroying the SDK instance. presentStudy(...) is the method that prepares and opens the study in the first place.

What’s next?

Identification

Understand how the SDK persists external IDs and user properties.

Studies

Review presentation options and hosted study behavior.