IsharaBeta
Install guides (31)

Add Ishara to SvelteKit

Add the feedback widget to a SvelteKit app by pasting one script tag before the closing body tag of src/app.html, the page template.

Where it goes
src/app.html, before </body>
Allowed domains
Your own domain (set when you add the site)
Time
About 2 minutes

Steps

  1. In Ishara, open Sites → your site → Install and copy the line under Add the line to your site. Your site’s key is already in it:

    HTML
    <script src="https://useishara.com/w.js" data-site="pk_…" defer></script>
  2. Open src/app.html, your page template, and paste the line just before </body>. SvelteKit only fills in its %sveltekit.…% placeholders in this file, so the tag reaches the browser as written:

    src/app.html
    <!doctype html>
    <html lang="en">
      <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1" />
        %sveltekit.head%
      </head>
      <body data-sveltekit-preload-data="hover">
        <div style="display: contents">%sveltekit.body%</div>
        <script src="https://useishara.com/w.js" data-site="pk_…" defer></script>
      </body>
    </html>
  3. Build and deploy the app.

  4. Open your site. Back on the Install page, Check it’s live turns into The widget is live as soon as the widget loads. Then open the Reviewer link from the same page: only people who open it see Leave a note.

Good to know

  • Use src/app.html rather than <svelte:head> in a layout: that’s meant for per-page titles and meta tags, and every page already renders inside app.html.
  • If you turn on SvelteKit’s nonce-based Content Security Policy, add nonce="%sveltekit.nonce%" to the tag.

Next

Once reviewers leave notes, your coding agent can apply them. The widget’s options (language, position, colour, launcher) are in the docs.