PeutlyDocs

Embed a demo

Put a demo on your website, in your docs or in your help center.

Embed a demo with a small script. It works on any site where you can add HTML.

Make sure the demo is Published. See Share link.

Click Share, then open the Embed code tab.

Choose Inline or Pop-up and set the options below.

Copy the code and paste it into your page's HTML. See platform instructions.

Inline

The demo sits in the page, where you paste the code.

Show launch screen is on by default. Viewers see a Launch interactive demo button over the demo, and the demo loads only after they click it. That keeps your page fast. Turn it off to start the demo straight away.

The code looks like this. Always copy it from Peutly, because it contains your demo's ID and size:

<!-- Peutly inline embed -->
<div
  data-peutly-id="abc123"
  data-peutly-show-launch-screen="true"
  data-peutly-width="1920"
  data-peutly-height="1080"
  data-peutly-frame-theme="light"
  style="width:100%;max-width:1280px;margin:24px auto;"
></div>
<script async src="https://share.peutly.com/embed.js?inline=true&apiBase=https%3A%2F%2Fapi.peutly.com"></script>

Pop-up

The demo opens in a window on top of your page.

Peutly adds a floating button to your page. Choose its Position (top left, top right, bottom left or bottom right) and Button label (default: View Demo).

<script async
  src="https://share.peutly.com/embed.js?apiBase=https%3A%2F%2Fapi.peutly.com"
  data-peutly-id="abc123"
  data-peutly-auto-button="true"
  data-peutly-button-position="bottom-right"
  data-peutly-button-label="View Demo"
></script>

Add the code to your site

Paste the code where the demo should appear. For a pop-up, anywhere in the page works.

Send demo events to your analytics

When you've connected Google Analytics, Heap or Segment, the Embed code tab shows a toggle to forward demo events to that tool on your page. It's on by default. The tab also shows a snippet for your page's <head>.

Only allow embeds on your own sites

On Pro, admins can list the domains where your demos may be embedded, under Settings → Access Control → Allowed embed domains. When the list is empty, demos can be embedded anywhere. See Access control.

On this page