HTML
All you need to do is add 3 lines of code to your HTML script and thats it, you’re done!
React
Get started with React
Next.js
Get started with Next.js
Vue
Get started with Vue
React Native
Get started with React Native
Prerequisites
Before getting started, make sure you have:- A web application (behind your user authentication system) in your desired framework is set up and running.
- A Userorbit account with access to your environment ID and API host. You can find these in the Setup Checklist in the Settings.
Handling Route Changes in SPAs
Single Page Applications (SPAs) and hybrid frameworks like Next.js often use internal routing that doesn’t trigger standard browser page loads. This can prevent Userorbit from detecting route changes, which is required for multi-page product tours to work correctly. If you encounter issues where tours do not progress across different pages, you must manually register route changes using:HTML
All you need to do is copy a<script> tag to your HTML head, and that’s about it!
Required customizations to be made
You can find the Userorbit you accountId at the Userorbit Account.ReactJS
Install the Userorbit SDK using one of the package managers ienpm,pnpm,yarn. Note that zod is required as a peer dependency must also be installed in your project.
You can find the Userorbit you accountId at the Userorbit Account.
Required customizations to be made
NextJS
NextJs projects typically follow two main conventions: the App Directory and the Pages Directory. To ensure smooth integration with the Userorbit SDK, which operates solely on the client side, follow the guidelines for each convention below:- App directory: You will have to define a new component in
app/userorbit.tsxfile and call it in yourapp/layout.tsxfile. - Pages directory: You will have to visit your
_app.tsxand just initialise Userorbit there.
App Directory
app/userorbit.tsx
app/layout.tsx
Pages Directory
src/pages/_app.tsx
Required customizations to be made
- You can find the Userorbit you accountId at the Userorbit Account.
- First we initialize the Userorbit SDK, ensuring that it only runs on the client side.
- To connect the Next.js router to Userorbit and ensure the SDK can keep track of every page change, we are registering the route change event.
VueJs
Integrating the Userorbit SDK with Vue.js is a straightforward process. We will make sure the SDK is only loaded and used on the client side, as it’s not intended for server-side usage.src/userorbit.js
src/main.js
Required customizations to be made
You can find the Userorbit you accountId at the Userorbit Account.
React Native
Install the Userorbit React Native SDK using one of the package managers, i.e., npm, pnpm, or yarn.src/App.js
Required customizations to be made
You can find the Userorbit you accountId at the Userorbit Account.
Debugging Userorbit Integration
Enabling Userorbit debug mode in your browser is a useful troubleshooting step for identifying and resolving complex issues. This section outlines how to activate debug mode, covers common use cases, and provides insights into specific debug log messages.Activate Debug Mode
To activate Userorbit debug mode:-
Via URL Parameter:
- Enable debug mode mode by adding
?userorbitDebug=trueto your application’s URL (e.g.https://example.com?userorbitDebug=trueorhttps://example.com?page=123&userorbitDebug=true). This parameter will enable debugging for the current page.
- Enable debug mode mode by adding
-
View Debug Logs:
-
Open your browser’s developer tools by pressing
F12or right-clicking and selecting “Inspect.” -
Navigate to the “Console” tab to view Userorbit debugging information.
How to Open Browser Console:
- Google Chrome: Press
F12or right-click, select “Inspect,” and go to the “Console” tab. - Firefox: Press
F12or right-click, select “Inspect Element,” and go to the “Console” tab. - Safari: Press
Option + Command + Cto open the developer tools and navigate to the “Console” tab. - Edge: Press
F12or right-click, select “Inspect Element,” and go to the “Console” tab.
- Google Chrome: Press
-
Open your browser’s developer tools by pressing
Common Use Cases
Debug mode is beneficial for scenarios such as:- Verifying Userorbit initialization.
- Identifying tour trigger issues.
- Troubleshooting unexpected behavior.
Debug Log Messages
Debug log messages provide insights into:- API calls and responses.
- Event tracking, tour triggers and widget interactions.
- Initialization errors.

