Installation Guide
Add a Swvle SuperFan to your site with the embed script from the channel Deploy panel.
Open the SuperFan in your workspace, go to Playground, and select the website chat button or website section channel. Use Deploy and copy the method that matches the install: Embed script, Mount in an element, or Iframe. Paste a website chat button script before the closing </body> tag. A website section script mounts where the tag sits, unless you use a container.
Website chat button
<script
async
src="https://www.swvle.com/embed.js"
data-id="YOUR_CHANNEL_ID"
></script>Website section
By default the channel renders in place of the script tag — no wrapping element required:
<script
async
src="https://www.swvle.com/embed.js"
data-id="YOUR_CHANNEL_ID"
></script>To mount it inside a specific element instead (e.g. a sidebar column), add data-container with a CSS selector and place the script tag anywhere on the page:
<div id="swvle-embed"></div>
<script
async
src="https://www.swvle.com/embed.js"
data-id="YOUR_CHANNEL_ID"
data-container="#swvle-embed"
></script>Iframe
Website section only. Use this when the host accepts an iframe and not a script tag. Deploy fills in the channel address and the saved height.
<iframe
src="https://www.swvle.com/embed/channel/YOUR_CHANNEL_ID"
title="SuperFan"
width="100%"
height="420"
loading="lazy"
referrerpolicy="strict-origin-when-cross-origin"
sandbox="allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox allow-top-navigation-by-user-activation"
style="border:0;display:block;overflow:hidden;background:transparent"
></iframe>Replace YOUR_CHANNEL_ID with the channel id from Deploy.data-id is that channel id. Saved channel settings for color, theme mode, language, radius, header, footer, position, and chrome always apply. The tag can't override them.
Optional overrides
Add any of the following data-* attributes to change the size or mount point for one specific install. Omit them to use the saved defaults.data-width and data-height are CSS lengths, so include the unit (640px or 100%). A bare number is treated as pixels. The Iframe method is different: its width and height are HTML attributes, so height="420" means 420 pixels and height="420px" is not valid there. The page inside the iframe fills that box.
| Attribute | Values | Overrides |
|---|---|---|
data-height | CSS length, e.g. 640px or 100%. A bare number is pixels. | Website section iframe height, or the website chat button panel height |
data-width | CSS length, e.g. 420px or 100%. A bare number is pixels. | Website section iframe width (default 100%), or the website chat button panel width |
data-container | CSS selector, e.g. #swvle-embed | Website section only — mount point (default: after the script tag) |