Skip to main content
This guide shows how to integrate Proof of Human’s bot detection suite into any web app.

Quick start

The Proof of Human tracker dispatches a roundtable:ready event on window as soon as it is done loading. Block 2 listens for that completion event so you can safely call window.setRoundtableUserId once the tracker is loaded.

Script‑tag attributes

The tracker recognizes three data‑attributes that let you tailor the tracker’s behavior:
  • data-site-key (required) – Your workspace’s site key (find it in the Dashboard).
  • data-user-id (optional) – A stable identifier for a logged‑in user to track them over multiple sessions (a hashed value is fine).
  • data-tags (optional) – A comma-separated list of tags that will be associated with this session. Tags help you group and organize sessions.

React / SPA example

The Proof of Human tracker exposes two functions to manually set extra tracking information. These are useful in React or single-page apps.
First, add the Proof of Human tracking script in public/index.html:
Then wire the user ID in React:
Call the hook in your auth/provider component; it runs every time currentUser changes, so it sets the UID immediately on page‑refresh and again right after a fresh login.

Using the Session ID

Every page‑view (or SPA session) gets a unique session ID that can be retrieved with window.getRoundtableSessionId(). You can reference this ID to pull risk scores and data from the session in your back end.
Because the session ID is stored in sessionStorage, the value is scoped to the current tab and cleared automatically when the tab is closed.

Next steps