Skip to content
Docs

Content locker

Cover your page, or a download button on it, until the visitor finishes an offer. You earn from every offer they finish.

Create a locker

  1. Open Content locker in your dashboard

    Click New locker and give it a name only you see.

  2. Choose when it opens

    As the page loads covers the whole page until they unlock it. When a button is clicked lets them read the page and opens the locker from a button or link, for example "Download".

  3. Pick where they go after unlocking

    Optional. Leave it empty and the locker just closes, showing the page they're on.

  4. Save and copy the code

    The locker page shows the exact code for your locker. It looks like the samples below.

Add it to your page

Put the script just before </body>. Replace LOCKER_UUID with your locker's ID, or copy the code from the dashboard where it's already filled in.

<script src="https://elitewall.io/content-locker/js/LOCKER_UUID" async></script>

Opening it from a button

For lockers set to When a button is clicked, add data-elitewall-locker to any button or link:

<button type="button" data-elitewall-locker>Download</button>

Or open it from your own code with EliteWallLocker.open().

Crediting your own users

If your visitors have accounts on your site, add their ID to the script tag. It's stored with each conversion.

<script src="https://elitewall.io/content-locker/js/LOCKER_UUID" data-user-id="USER_ID" async></script>

React when it unlocks

The locker tells your page when the visitor is through. Listen for it to show hidden content or start a download:

window.addEventListener('message', function (event) {
    if (event.origin !== 'https://elitewall.io') return;   // only trust our locker
    if (event.data && event.data.action === 'unlocked' && event.data.locker === 'LOCKER_UUID') {
        document.getElementById('hidden-content').hidden = false;
    }
});

A visitor who already unlocked stays unlocked for the time you chose in Stays unlocked for. During that time the locker closes on its own when they come back.

Without your own website

Every locker also has a page of its own that you can share as a link or show in an iframe:

<iframe src="https://elitewall.io/content-locker/LOCKER_UUID/show" style="width:100%; height:640px; border:0" title="Unlock content"></iframe>