The init() method initializes the Usertour SDK for your environment. This method must be called once per page load before making any other Usertour.js calls.

Parameters

token
string
required

Your Usertour environment token. You can find this token under Settings → Environments. Each environment (e.g., Production, Staging) has its own unique token.

Example

// Initialize the Usertour SDK with your environment token
usertour.init('USERTOUR_TOKEN');

Notes

  • The init() method must be called before any other Usertour.js methods
  • Each environment (Production, Staging, etc.) requires its own unique token
  • The token is used to identify your environment and load the correct configuration