Install guide

Live chat for Astro

Paste one script tag in the layout your pages share and every page gets the chat. Add is:inline so Astro ships the tag as written instead of bundling it.

No credit card needed · Free for 21 days

src/layouts/Layout.astro
<body>
<slot />
<script
is:inline
src="https://app.mewdesk.com/widget.js"
data-site-id="YOUR_SITE_ID"
async>
</script>
</body>
</html>

Where it goes

Paste it once on Astro

The snippet is the same on every platform: one script tag just before the closing body tag. These steps show where that is on Astro.

  1. 1

    Copy your snippet from the dashboard

    Add your website under Websites, using the domain you are installing on, and copy the snippet from its Embed code page. It has your site ID filled in; the one shown here uses a placeholder.

  2. 2

    Open your shared layout

    In Astro's starter templates it is src/layouts/Layout.astro, the component that renders <html> and <body> around each page's <slot />. Every page that uses the layout gets the chat.

  3. 3

    Paste the snippet before </body>, with is:inline

    Astro processes and bundles the <script> tags it finds in components by default. The is:inline directive tells it to leave this tag exactly as written, so the browser loads widget.js as a plain async script and the loader can read data-site-id from its own tag.

  4. 4

    Run or deploy

    The chat bubble shows on every page that uses the layout, whether you build a static site or render on the server with an adapter. The widget needs nothing from your server.

Good to know

  • Astro already skips processing for a <script> that has any attribute other than src, and the snippet has data-site-id and async, so it would stay a classic script even without is:inline. The directive makes that intent explicit and keeps it true if the attributes change.
  • Islands need nothing extra. The chat sits outside your React, Vue, Svelte or Solid components, in its own iframe, so it never touches their hydration.

What you get

The same Mewdesk, whatever your site runs on

The widget lives in its own iframe, so it looks and works the same on Astro as everywhere else.

One script tag

That is the whole install. No npm package, no build step, no plugin to keep updated.

Replies in seconds

Visitors see your answer the moment you send it, without refreshing. Your team replies from one inbox.

Offline form

When nobody is online, visitors leave their email and a message, and the chat picks up where it left off.

No tracking cookies

No IP addresses, no fingerprinting, no third-party scripts. A name, an optional email and the conversation.

FAQ

Mewdesk on Astro

Questions people ask before adding live chat to a Astro site. For everything else, the general FAQ has the rest.

Is there an Astro integration or npm package for Mewdesk?

No, and you don't need one. The install is one script tag in your layout, with no integration to add to astro.config and nothing to import.

Why does the Astro snippet have is:inline?

Astro bundles and optimizes <script> tags by default. is:inline opts this tag out, so it ships to the browser exactly as written: a plain async script whose data-site-id the loader reads from its own tag.

Does it work with Astro islands and UI framework components?

Yes. The widget runs in its own iframe outside your components, so React, Vue, Svelte or Solid islands hydrate as usual and your styles never clash with the chat.

Add live chat to your Astro site today

Paste the snippet, answer your first visitor. The first 21 days are on us, with no card needed.