FAQ
Can I use the Svelte SDK with SvelteKit?โ
Yes. Call setScreebContext from a root layout or page component. See Troubleshooting โ SSR / SvelteKit compatibility.
Can I use the Svelte SDK with Svelte 2?โ
No. @screeb/sdk-svelte requires Svelte 4 or later. Svelte 2 is not supported.
Does the SDK work with SSR?โ
The SDK guards against SSR with typeof window === "undefined". The Screeb tag script is never loaded on the server side.
Can I have multiple Screeb channels in one app?โ
No. The provider stores a single Screeb instance in Svelte context for the current component tree, and the browser tag is global to the page. For multi-channel setups, contact Screeb support.
Where do I find my channel ID?โ
In your Screeb workspace under Settings โ Install. The channel ID is also called "website ID".
Does the SDK affect bundle size?โ
@screeb/sdk-svelte itself is ~3 kB (minified + gzipped). The Screeb widget script is loaded asynchronously and does not block rendering.
How do I disable Screeb in CI or test environments?โ
Set shouldLoad: false in the provider config when running in non-production environments:
<script lang="ts">
import { setScreebContext } from "@screeb/sdk-svelte";
setScreebContext({
websiteId: "<YOUR-CHANNEL-ID>",
shouldLoad: import.meta.env.PROD,
autoInit: true,
});
</script>