# Add Ishara to v0 by Vercel

Add the feedback widget to a v0 app by asking v0 to load the script from the root layout with next/script, then publishing the app.

- Where it goes: `app/layout.tsx`, through the chat or the Code tab
- Allowed domains: your own domain, plus your-project.vercel.app
- Time: about 3 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. In your v0 chat, send the prompt below. It asks v0 to load your line from `app/layout.tsx` with `next/script`, which keeps `data-site`.

```
Add this to the root layout (app/layout.tsx) so it loads on every page: import Script from "next/script" and put the line below inside <body>, after {children}. Keep src and data-site exactly as written and don’t change anything else.

<Script src="https://useishara.com/w.js" data-site="pk_…" strategy="afterInteractive" />
```

3. Check the change in the **Diff** tab: the `Script` should still have `data-site`.
4. Click **Publish** (the first time, confirm the Vercel project, visibility and domain), or **Publish Changes** if the app is already live.
5. 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**.

## Edit the layout yourself

Open the **Code** tab, then `app/layout.tsx`, and add the `Script` import and element as in this minimal layout. The [Next.js guide](https://useishara.com/docs/install/nextjs) has more detail.

```
import Script from "next/script";

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en">
      <body>
        {children}
        <Script src="https://useishara.com/w.js" data-site="pk_…" strategy="afterInteractive" />
      </body>
    </html>
  );
}
```

## Good to know

- Send the prompt as it is. If you describe the widget in your own words, the AI may write the tag from memory and leave out `data-site`.
- If the project is connected to GitHub, v0 never pushes straight to `main`: publishing goes through a pull request.
- If the widget doesn’t appear in v0’s preview, open your browser’s console: the widget names the address it was blocked on; add that host to the site’s allowed domains.

Checked against the official docs on 2026-11-12: [v0: deployments](https://v0.app/docs/deployments), [v0: code editing](https://v0.app/docs/code-editing), [v0: custom domains](https://v0.app/docs/custom-domains), [v0: FAQs](https://v0.app/docs/faqs).
