Reveal your price and buy button at the right moment
This article shows you how to hide parts of your sales page, such as the price or the buy button, until the video reaches a certain time.
How it works
You mark the parts of your page you want to hide with a short label (a "key"). Then you tell PlayerMagick at what time in the video to show them. Until that time, those parts stay hidden. When the video reaches it, they appear.
- They appear when the video reaches that time in any way, including when a visitor skips ahead past it.
- Visitors who already reached that time before (on the same device) see them straight away when they come back.
- It is handled by the PlayerMagick code you paste on your page. When your video has a page reveal, that code includes two extra short lines that keep the hidden parts hidden while the page loads (see Step 2).
- This needs the Script (recommended) embed code, not the iframe code.
Your buy button is never lost. If the video cannot load for a visitor (for example a browser extension blocks it, or their connection drops), PlayerMagick shows the hidden parts anyway. An early buy button is better than no buy button.
Step 1: Add the page reveal in PlayerMagick
- Go to Videos and open your video.
- Click the Interactions tab.
- On the Timeline, click + Page reveal.
- Set the time when the hidden parts should appear (usually the moment you reveal the price in the video).
- Choose a key. PlayerMagick suggests one made from the video's title, for example
spring-offer-vslfor "Spring Offer VSL"; keep it or type your own.- Use a different key for each video of a funnel on the same website (for example the sales video and the upsell). A visitor who reached one video's reveal time sees every part marked with that key at once on later pages.
- If you change the key after you added it to your page, the editor reminds you to change the attribute on your page too: parts still marked with the old key stay hidden.
- Use lowercase letters, numbers and dashes, with no spaces. Capital letters are changed to lowercase for you (
Offerbecomesoffer). - Up to 64 characters.
- The Interactions tab shows the exact attribute to add to your page, for example
data-pm-reveal="spring-offer", with a button to copy it.
Step 2: Copy the updated embed code
After you add your first page reveal, the editor reminds you to copy the code again. Copy it from the Publish tab and replace the code on your page. It now has two extra lines at the top, like this:
<style id="pm-reveal-hide">[data-pm-reveal]{display:none}</style>
<script>(function(w,d){ … })(window,document)</script>
<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 two lines hide the labelled parts from the very first moment your page appears, so visitors never see them flash on screen and disappear. As soon as PlayerMagick is running, it takes over. If PlayerMagick has not started 8 seconds after your page loaded, these lines show everything again, so nothing stays hidden by mistake.
- Paste the two extra lines once per page, even if the page has several videos.
- Keep them exactly as copied.
- If you remove the last page reveal from the video, the two lines disappear from the code again. Copy the code again and replace it on your page.
Step 3: Label the parts of your page
Add data-pm-reveal="offer" (with your own key) to each part of the page you want to hide. In most page builders, you do this by putting that part inside a custom HTML element, or by adding a custom attribute in the element's advanced settings.
Example: a buy button
<a href="https://example.com/checkout" data-pm-reveal="offer" class="buy-button">
Yes, I want it!
</a>
Example: a price box
<div data-pm-reveal="offer" class="price-box">
<h2>Get instant access today</h2>
<p><s>$497</s> Only $197</p>
<a href="https://example.com/checkout">Buy now</a>
</div>
You can use the same key on as many parts of the page as you like. They all appear at the same time.
Step 4: Test it
First check the timing in the editor: click Preview. The preview page has a sample element with your key, so you can see it appear at the right time.
Then test your real page:
- Open your live page in a private window (so it does not remember a previous visit).
- Check that the price and button are hidden.
- Play the video past the reveal time and check that they appear.
Do not hide the elements yourself
Do not add style="display:none" (or a "hidden" setting in your page builder) to the parts you labelled. PlayerMagick cannot undo that, so they would stay hidden forever, even after the reveal time. The two extra lines from Step 2 already prevent the flash.
If your site has strict security settings
Some websites only allow code from approved sources (a security setting called a Content Security Policy). On those sites, the two extra lines from Step 2 may be blocked. Page reveal still works; the labelled parts may just show for a split second before they are hidden. Your developer can allow the two lines. See Fix a video on a site with strict security settings.
Good to know
- Page reveal hides content from view, but it is still in your page's code, and a visitor can skip ahead in the video to reach it. Do not use it to protect anything secret, such as a download link or a coupon you don't want shared.
- Combine it with a call-to-action button at the same time for the strongest effect.
- In a funnel, each offer can reveal its own part of the page with the same
data-pm-revealattribute, and Keep other paths’ parts hidden shows only the part of the path a viewer took; see Show each path its own offer.
Troubleshooting
- The content never appears. Check that the key in the page and the key in PlayerMagick are exactly the same, including dashes and lowercase. Also check that the element itself does not have
style="display:none"or a "hidden" setting in your page builder. - The content is not hidden at all. Check that you used the script embed code (not the iframe) on this page, and that the attribute is spelled
data-pm-reveal. - The content shows for a moment and then disappears. The two extra lines from Step 2 are missing (or blocked by your site's security settings). Copy the code again from the Publish tab.
- The content shows from the start for some visitors. That is the safety net: when the video cannot load for a visitor, PlayerMagick shows the hidden parts so they can still buy.
- It shows right away when I test. You already reached the reveal time on this device. Test in a private window.
- The key is refused. Use only lowercase letters, numbers and dashes, with no spaces:
spring-offer, notspring offer. - I use the iframe code. Page reveal needs the Script (recommended) code. The Publish tab tells you this when Iframe is selected.