Embed a video on your sales page

Updated Oct 22, 2026 · 6 min read · All plans

This article shows you how to copy your video's code and paste it on your sales page, in any page builder that accepts custom HTML.

Before you start

  • Your video must show Ready in Videos. If it still shows Converting, wait until it finishes.
  • You need to be able to edit your sales page and add a custom HTML (or "code") element.

Copy the code

  1. Go to Videos and open your video.
  2. Click the Publish tab (or Get embed code in the top bar).
  3. Make sure Script (recommended) is selected.
  4. Click Copy code. The button shows "Copied" for a moment.

The code looks like this (your video ID will be different):

<script async src="https://cdn.playermagick.com/v1/embed.js"></script>
<div data-pm="v_8fK2aQ" style="aspect-ratio:16/9;width:100%"></div>

The first line loads PlayerMagick. The second line is the spot where your video appears.

If your browser does not allow copying, PlayerMagick selects the code for you; press Ctrl+C (⌘C on a Mac) to copy it.

Anyone on your team can copy the code, including people with the Viewer role.

You can copy the code before the video is Ready; the Publish tab says it will work once the video is ready. The shape in the code (16/9) is then a placeholder: copy the code again when the video is ready if it is not a widescreen video.

Keep the style="…" part exactly as copied. It reserves the right amount of space for the video before it loads, so your page does not jump. Some page builders or code tidy-up tools offer to remove inline styles; do not let them. If your video has a button below it, the style part also reserves room for that button.

If your video uses page reveal, the code has two more short lines at the top. Paste them too (once per page).

When to copy the code again. You never need to for a settings change. You do need to when the code itself changes, and the Publish tab tells you so:

  • after you add your first page reveal (or remove the last one),
  • after you add or remove a Below video button,
  • after you replace the file with one of a different shape, for example vertical instead of widescreen.

Paste it on your page

  1. Open your sales page in your page builder or website editor.
  2. Add an element called Custom HTML, HTML, Embed or Code (the name depends on your builder) where you want the video.
  3. Paste the code into it.
  4. Save and publish your page.
  5. Open the live page in your browser to check the video.

Tip: if your builder has a separate place for "header code" or "tracking code", you can put the <script> line there instead and keep only the <div> line where the video goes. Both ways work.

You only paste the code once

When you change settings later (colors, buttons, autoplay), your page updates on its own. You do not need to paste the code again. Changes usually show on your live page within about a minute. Refresh the page if you still see the old version.

Several videos on one page

  1. Paste the full code (both lines) for the first video.
  2. For every other video, paste only the <div> line from its Publish tab.

The <script> line is needed only once per page. If you paste it more than once by accident, that is fine: it still loads only once.

If your builder does not accept scripts: use the iframe code

Some builders remove <script> tags. In that case:

  1. In the Publish tab, choose Iframe.
  2. Click Copy code.
  3. Paste it in your builder's HTML or embed element.

The iframe code looks like this:

<iframe src="https://playermagick.com/v/v_8fK2aQ?embed=1" title="Spring offer VSL" style="aspect-ratio:16/9;width:100%;border:0" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen loading="lazy"></iframe>

What works in the iframe version:

WorksDoes not work
Playback, your look and thumbnail, autoplay, call-to-action buttons, email gates, what happens at the endPage reveal: it changes parts of your page outside the player, which an iframe cannot do. The Publish tab warns you if the video has a page reveal.

Good to know:

  • A button link in the iframe opens in the whole browser window (or in a new tab, if you chose that), never inside the small frame.
  • Where it can play also protects the iframe version: on a website that is not on your list, the browser refuses to show the frame (most browsers show a small "refused to connect" notice in its place). With an empty list, the iframe works on any website.
  • The iframe works on your pages whether Public video page is on or off. Opening its address directly in a browser follows the public page setting: while the page is off, it shows "This video isn't available." See Share your video with a link.
  • If the video ends with Go to a page, that page opens inside the frame, not in the whole window. Use the script code for videos that send visitors to another page at the end.
  • The script version is faster. Use the iframe only when your builder leaves no other choice.

Check your page speed setup

The Publish tab also has a Speed check list. It looks at your setup and tells you what to improve:

  • Script code used (not iframe): the script code is the fastest way to show the video.
  • Poster in AVIF: the picture visitors see first is a small, modern image file. PlayerMagick makes it for you during conversion.
  • Player loads on demand: only a tiny script loads with your page; the player itself loads when it is needed.
  • No third-party scripts: the player loads nothing from other companies.
  • Video storage has a CDN: if the video's bucket has no CDN in front of it, visitors far away may wait longer. Fix this takes you to the steps. See Manage your storage connections.

Tip: the <script> line is needed only once per page, even with several videos.

Troubleshooting

  • The video does not show. See Why is my video not showing?
  • It shows on one website but not another. Check Choose which websites can play your video.
  • The video is cut off or has black bars. Make sure you copied the code from this video's Publish tab and did not change the style part.
  • The page jumps when the video appears. The style part was removed or changed, often by a page builder. Paste the code again exactly as copied.

Was this article helpful?