Skip to content
Open Screeb

Add the Screeb SDK to your app and start it with your channel id, so surveys, messages and session replay can run.

Install the Screeb SDK once, at the start of your app, with the channel id of your workspace. Until a user is identified, Screeb tracks them as an anonymous visitor: see Identity to attach your own user id.

Your channel id is on the Install page of your workspace settings. The steps on the admin side are in the help center: Install Screeb on your website and Install Screeb in your mobile app.

  • Node.js 14 or later.
  • React 17+, Vue 3+, Angular 12+ (14+ for standalone bootstrapping), Svelte 4+, or Ionic 6+ with Capacitor 4+, depending on your package.
  • The same browsers as the JavaScript tag: Chrome 94+, Firefox 91+, Safari 15+, iOS 15+, Edge 94+, with a legacy bundle for older ones.
  • With server-side rendering (Next.js, Nuxt, SvelteKit), load and start Screeb on the client side only.
Terminal window
npm install @screeb/sdk-angular
import { importProvidersFrom } from "@angular/core";
import { bootstrapApplication } from "@angular/platform-browser";
import { provideIonicAngular } from "@ionic/angular/standalone";
import { ScreebModule } from "@screeb/sdk-angular";
import { AppComponent } from "./app/app.component";
bootstrapApplication(AppComponent, {
providers: [
provideIonicAngular(),
importProvidersFrom(
ScreebModule.forRoot({
autoInit: true,
websiteId: "<YOUR-CHANNEL-ID>",
}),
),
],
});

autoInit starts Screeb as soon as the SDK has loaded. When the user is already logged in at that point, pass userId and userProperties too, so Screeb never creates an anonymous visitor for them (see Identity). To keep Screeb from loading in tests or CI, set shouldLoad to false there.

If your app still bootstraps an NgModule, import ScreebModule.forRoot there instead:

import { NgModule } from "@angular/core";
import { ScreebModule } from "@screeb/sdk-angular";
@NgModule({
imports: [
ScreebModule.forRoot({
autoInit: true,
websiteId: "<YOUR-CHANNEL-ID>",
}),
],
})
export class AppModule {}

Ionic apps run in a WebView, so the web SDK works as on a website and no native plugin is needed, including when you ship with Capacitor. This page uses @screeb/sdk-angular for Ionic Angular. For Ionic React, Vue or vanilla JavaScript, follow the React, Vue or Browser pages.

Stop Screeb at any time, for example when the user withdraws consent. It stays off until you start it again.

await this.screeb.close();