All features

SPA support

Run campaigns on single-page apps, once our team has switched it on for your domain.

What it is

SPA support, in plain words.

A single-page application loads one document and swaps its content with JavaScript, without reloading the page. Many modern storefronts and web apps work this way, including headless shops where visitors move from product to cart without a page load.

That's a problem for any popup tool that thinks in pages. Because the page never reloads, OptiMonk can't see the visitor moving on by itself: campaigns may not trigger, trigger on the wrong page, or appear repeatedly.

SPA mode fixes that. It's switched on per domain by the OptiMonk team. With it on, OptiMonk notices each route change made through the browser's history, closes the campaigns from the previous view, and checks triggers and targeting again for the new one, just like on a fresh page load.

Contact us over live chat before you launch campaigns on a single-page app. After that, you build and publish campaigns as on any other site.

When to use it

Where it pays off.

A headless storefront.

Visitors move from a product page to the cart without a reload; a cart campaign still shows on the cart route.

URL targeting on an app.

Show a campaign on your pricing route only, even though the browser never loads a new page.

A different popup per section.

Run one campaign on /shop and another on /cart; each route gets its own check.

Exit intent in a web app.

An exit-intent campaign keeps working as visitors navigate inside the app.

Key benefits

Why it earns its place.

01

Works on modern web apps.

Once SPA mode is on, campaigns re-check on every route change.

02

Set up for you.

The OptiMonk team switches it on for your domain.

03

No code changes on your side.

You don't need to call OptiMonk from your router.

How it works

Three steps to go live.

  1. 1
    Step 1

    Tell us first

    Contact us over live chat before you launch campaigns on a single-page app.

  2. 2
    Step 2

    We switch on SPA mode

    The team turns it on for your domain.

  3. 3
    Step 3

    Launch as normal

    Build and publish campaigns as on any site; they re-check rules on every route change.

Settings & limits

Good to know.

A team setting.

SPA mode isn't a switch in the app; the OptiMonk team turns it on per domain.

Built for History-API routing.

Route changes made through the browser's history are followed. For other kinds of routers, ask our team.

Each route is a fresh start.

On a route change, campaigns from the previous view close and rules are checked again.

Without it, results are unpredictable.

Campaigns may not trigger, trigger on the wrong page, or appear repeatedly.

Questions, answered.

Step-by-step setup lives in the Help Center guide.

OptiMonk monk meditating in lotus pose

Try SPA support
on your own store.

Free to start. No credit card.