Set up the waiting room in one line.

Three steps. The only one that touches your site is pasting a single line.

Steps

  1. Get your site ID

    We set up your site and send you an ID. During early access we do this by hand.

    No ID yet? Ask for one, or try it with site_demo.

  2. Paste this into your page's <head>

    <script src="https://fourway.io/w.js"
            data-site="site_yourshop" data-hold="/api/"></script>

    Put it on every page, above your other scripts. data-hold keeps calls to /api/ waiting until the visitor is in; change it to your own paths, or leave it out.

  3. Check that it works

    That is it. On a calm day nobody waits, so you will not see the line. Watch it in the demo.

What your visitors see on a busy day
Your name and colour, taken from your page. No FourWay branding.

Optional extras

Pause bots during a rush

Add two lines at the very top of your site's PHP entry file. While your site is busy, AI crawlers and scripts are asked to come back later. People and search engines pass.

require __DIR__ . '/fourway_gate.php';
fourway_bot_gate('site_yourshop');

Get fourway_gate.php, or a Cloudflare Worker version, from the docs.

Only let in visitors with a pass

For checkout or sign-up, you can refuse anyone who skipped the line. Add data-pass="1" to the script and check the pass on your server with the code in the docs.

Expecting a very big spike?

Let your host or CDN cache your pages for a few seconds. The page loads before the script runs, so caching keeps a rush of page views off your server.

Something not working?

I never see the wait screen

That is normal on a calm site. Open the demo, or ask us for test mode.

The script is blocked

Add https://fourway.io to script-src and connect-src in your Content Security Policy.

API calls run too early

Load the script first in the head, without async.

Something else

Run the check in step 3 and send us what it says.

Ready for your biggest day?

Ask for a site ID and you can be live this afternoon. Or watch a rush in the demo first.