Embed a funnel on your sales page
This article shows you how to copy a funnel's embed code and paste it on your sales page, with the parts of your page each path reveals.
Available on: every plan. Starter can have up to 10 live funnels; Pro, Business and Agency have no limit.
Before you start
- The funnel must be published to play. You can copy the code before that: "This funnel is not published yet. The code shows nothing on your page until you publish it."
- You need to be able to add a custom HTML (or "code") element to your sales page.
Copy the code
- Click Funnels in the main menu and open your funnel.
- Click Get embed code.
- Click Copy code.
The code looks like a video's code, with the funnel's ID (yours will be different):
<script async src="https://cdn.playermagick.com/v1/embed.js"></script>
<div data-pm="f_8kq2Tz4WmA1b" style="aspect-ratio:16/9;width:100%"></div>
If an offer reveals parts of your page, the code has two more short lines at the top that keep those parts hidden while the page loads. Paste them too, once per page. The two lines are a <style id="pm-reveal-hide"> line and a short <script>. The style part of the box takes the shape of the first video viewers get, and if an offer shows its button below the player, it also reserves room for that row.
Keep the style="…" part exactly as copied, so your page does not jump when the funnel loads.
Paste it on your page
- Open your sales page in your page builder.
- Add a Custom HTML (or HTML, Embed, Code) element where the funnel should play.
- Paste the code, save and publish your page.
- Open the live page in a private window and click play.
Mark the parts of your page for each path
Under Parts of your page for each path, the dialog lists the key of every offer that reveals something, for example:
<section data-pm-reveal="offer-plan">…</section>
Add each attribute to the part of your page it should reveal. Those parts stay hidden until a viewer reaches that offer. See Show each path its own offer.
Add the line to your thank-you page
Under Count sales for each path, copy the line and add it to the page buyers see after paying. See Count sales on your thank-you page.
When to copy the code again
"The same code keeps working when you change the funnel." Copy it again only when it changes, for example after you add the first offer that reveals a part of your page, or the first offer shown below the video.
Good to know
- Your page stays fast. Until a viewer clicks play, a funnel costs your page what a single video costs. The rest of the funnel loads in the background once the page has settled.
- One player plays at a time. If your page has a funnel and other videos, starting one pauses the others. Two funnels on one page each remember their own viewers.
- Use one key per offer on a page. Page part keys work across the whole page: if two funnels on the same page use the same key, reaching it in either reveals the part.
- Websites. A new funnel plays on any website. To limit it, open Funnel settings (click an empty part of the canvas) and, under Where it can play, click Add a domain and type the website, for example
example.com. Subdomains are included:example.comalso coverswww.example.comandoffer.example.com. Only these websites can then show the funnel; leave the list empty to allow any website. The funnel's list applies to all its videos while they play in the funnel; their own lists don't. - Strict security settings. A funnel needs nothing beyond what a video needs. See Fix a video on a site with strict security settings.
- Iframe code. Funnels have one embed code, the script above.
Troubleshooting
- Nothing shows on my page. Check that the funnel is Live on the Funnels page. After Unpublish, pages with its code show nothing within a minute.
- Only the first video plays, as a normal video. The rest of the funnel could not load, for example a browser extension blocked it. Every page part is then shown so your buy button is never lost. If it happens everywhere, check that your plan still includes funnels. See Funnel limits and plans.
- The page parts never appear. Check that the keys on your page match the dialog's, and that you pasted the two extra lines.
- The video doesn't show at all. See Why is my video not showing?