Installation Guide
Technical Steps for Seamless Userback Deployment
We offer multiple methods to fit various development environments and project requirements.
Prerequisites
- Userback Workspace 14-Day Free Userback Trial
- Project-specific Widget Access Token
Method 1: Basic Snippet
Suited for Standard Websites
- Retrieve: Access your JavaScript snippet from the Userback dashboard
- Insert: Place it before the closing
</body>
tag in your HTML.
<script>
window.Userback = window.Userback || {};
Userback.access_token = 'widget_access_token';
(function(d) {
var s = d.createElement('script');s.async = true;
s.src = 'https://static.userback.io/widget/v1.js';
(d.head || d.body).appendChild(s);
})(document);
</script>
- Plug & Play: Ideal for static websites.
- Automatic Activation: Widget activates immediately upon page load.
- Limitations: Potential delay in loading can miss capturing early logs and errors. Page-reload resets the session.
Method 2: Script Tag
For Single Page Applications and Dynamic Sites
- Embed: Insert the script into the
<head>
of your HTML. - Initialize: Initialize with
Userback.init()
.
<head>
<script src="https://static.userback.io/widget/v1.js"></script>
</head>
Userback.init("your_widget_access_token");
- Precision Tracking: Optimized for dynamically loaded content.
- Console Log Synchronization: Captures all console logs and errors.
- Extended Session Replays: Support for long-duration and multi-page session recordings.
Method 3: Using NPM or Yarn
- Package Installation: Utilize your package manager of choice.
npm i @userback/widget
# or
yarn add @userback/widget
npm i @userback/react
# or
yarn add @userback/react
npm i @userback/vue
# or
yarn add @userback/vue
- Granular Control: High customization potential.
- Rapid Deployment: Faster implementation of Method 2 features via package installation.
Initialize
Utilize our JavaScript SDK for further customizations and functionalities, refer to JavaScript SDK Documentation.
Userback.init("widget_access_token");
If you need help at any point, send a message to our support team.
Updated about 1 month ago
Whatβs Next