Skip to main content
Version: Browser SDK

FAQ

Answers to common questions about @screeb/sdk-browser.

Can I use Screeb without identifying users?

Yes. Screeb assigns an anonymous ID automatically when you call Screeb.init(). You don't need to call Screeb.identity() if you want to track anonymous users. Anonymous users count toward your Monthly Tracked Users (MTU).

How do I prevent Screeb from loading in test/CI environments?

Use the shouldLoad config option to conditionally initialize Screeb:

Screeb.init('YOUR_WEBSITE_ID', {
shouldLoad: process.env.NODE_ENV === 'production'
});

This prevents Screeb from loading in development, testing, or CI environments.

Can I call init() multiple times?

No. Call Screeb.init() only once per page load or app session. Calling it multiple times may cause unexpected behavior. If you need to switch users, use Screeb.identityReset() followed by Screeb.identity().

How do I switch to a different user (e.g., after login)?

Call Screeb.identityReset() first to clear the current session, then call Screeb.identity() with the new user ID:

Screeb.identityReset();
Screeb.identity('new-user-id', {
email: 'support@screeb.app',
// other properties
});

Where do I find my Channel ID (Website ID)?

Your Channel ID (also called Website ID) is available in the Screeb admin console under Settings > Install. It looks like a UUID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.

Why is my survey not showing?

Common reasons a survey might not appear:

  1. Targeting rules: Check the survey targeting rules in the admin console
  2. User identification: Ensure the user is identified before the survey trigger fires
  3. shouldLoad is false: Check that shouldLoad is not set to false in your config
  4. Ad blockers: Some ad blockers may prevent Screeb from loading

See the Troubleshooting page for more detailed debugging steps.

Does sdk-browser work with SSR (Next.js, Nuxt)?

Screeb runs client-side only. In Next.js, initialize Screeb inside useEffect or use a client component:

useEffect(() => {
Screeb.init('YOUR_WEBSITE_ID');
}, []);

In Nuxt, use a client-side plugin with mode: 'client' or wrap your Screeb code in onMounted().

What's the difference between sdk-browser and sdk-js (JS tag)?

  • @screeb/sdk-browser (this package) is an NPM package with TypeScript types and methods like Screeb.init(). It's designed for bundled apps using webpack, Vite, etc.
  • sdk-js is the $screeb() global function loaded via a <script> tag. It's designed for plain HTML sites without a build system.

Use @screeb/sdk-browser for modern JavaScript frameworks and bundled applications. Use sdk-js for traditional HTML sites.

Can I customize the survey widget appearance?

Survey appearance is configured in the Screeb admin console, not in the SDK. You can customize colors, fonts, and positioning through the survey editor. The SDK respects these settings automatically.

Does Screeb work with Content Security Policy (CSP)?

Yes, but you need to allow Screeb domains in your CSP headers. Add the following to your CSP:

  • script-src: https://*.screeb.app
  • connect-src: https://*.screeb.app
  • frame-src: https://*.screeb.app
  • img-src: https://*.screeb.app

See the Troubleshooting page for the complete CSP configuration.