Other frameworks
✓ 2 minutes setup
Easy

FeedbackJar + SvelteKit

FeedbackJar integrates with SvelteKit via a script tag in app.html or a lifecycle hook in your root layout. Works with SSR and static site generation.

Get your Widget ID free → 7-day free trial · No credit card required

How to install FeedbackJar in SvelteKit

1

Get your Widget ID

bash
# Sign up at app.feedbackjar.com
# Create a widget → copy your Widget ID
2

Option A — Add to src/app.html

html
<!-- src/app.html — before </body> -->
<script src="https://cdn.feedbackjar.com/sdk.js"></script>
<script>
  window.fj.init('YOUR_WIDGET_ID');
</script>

Simplest approach — loads FeedbackJar on every page.

3

Option B — Load in root +layout.svelte

svelte
<!-- src/routes/+layout.svelte -->
<script lang="ts">
  import { onMount } from 'svelte';
  import { PUBLIC_FEEDBACKJAR_ID } from '$env/static/public';

  onMount(() => {
    const script = document.createElement('script');
    script.src = 'https://cdn.feedbackjar.com/sdk.js';
    script.async = true;
    document.body.appendChild(script);
    script.onload = () => window.fj.init(PUBLIC_FEEDBACKJAR_ID);
  });
</script>

<slot />
4

Identify users (optional)

svelte
<!-- src/routes/+layout.svelte -->
<script lang="ts">
  import { onMount } from 'svelte';
  import { page } from '$app/stores';

  $: user = $page.data.user;

  $: if (user && typeof window !== 'undefined' && window.fj) {
    window.fj.identify({ id: user.id, email: user.email });
  }
</script>

What you get

  • app.html or +layout.svelte — your choice
  • Uses SvelteKit's $env/static/public for env vars
  • onMount ensures client-only execution
  • Reactive user identification with $: reactive statements
  • Compatible with SSR and static adapters
  • Custom trigger with on:click

Add feedback to your SvelteKit app today

Sign up free, grab your Widget ID, and have the feedback widget running in your SvelteKit app in 2 minutes.

Start Free Trial 7-day free trial · No credit card required

Frequently Asked Questions

Looking for the full technical reference? Read the SvelteKit docs →