On this page

What it does

Four kinds, one look

A top bar above the header, part of the page so it never moves it; a slide-in that slides in at a bottom corner and leaves the page usable; a popup that opens by itself over the page, in the middle of the screen, and dims it, as a sheet at the bottom on phones; and a box in a page, which sits inside a page or post where an editor places it with the “Popups box” block.

Colours that match

Your theme’s colours, one of five ready-made sets, or your own, chosen once for every popup. Each set has a matching dark version for visitors whose device is in dark mode, and the cookie banner of Analytics & Cookies offers the same sets.

What it says

A heading, a short text, a picture from your media library, and either one button or a form from the official forms plugin. Sign-ups land in the Forms inbox, with its emails and notifications.

When and where

After they have read a while, when they click a link or button, or when they are about to leave (computers only). Every page, pages under an address or a whole collection, never on pages you name, phones or computers, with a start and an end in your site’s time zone.

Respect, built in

At most one popup or slide-in per visit, never while the cookie banner of Analytics & Cookies is waiting for an answer, never while someone is typing, and not on the first page of a visit unless you allow it on computers. Always a close button, and Esc closes it.

Results

Each popup’s own page shows how it is doing over the last 30 days, this month, last month or since it started: sign-ups or clicks and the rate, each with the change from the period before, a chart a day, and how often it was seen and closed. The Results tab compares every popup for the same period. Both download as a spreadsheet, and days follow your site’s time zone. It stores no cookies and nothing about any visitor, and visits from a browser signed in to the admin are not counted.

Which popup brought a sign-up

Add hidden fields named utm_campaign, utm_source, utm_medium or page_url to a form under Forms, and Popups fills them in, so Submissions, Lead Delivery and your CRM show which popup a sign-up came from. Button links to other websites get the same campaign tags for Google Analytics.

Preview and checks

Preview on your site shows the popup to you alone and says whether a real visitor would see it now, and if not, why. Your own colours are refused when they are hard to read, and so are unsafe links. If a form disappears the popup stays closed and you get one email that day.

Install

How to install a plugin on EmDash: the registry or npm

A developer adds it once, in the site’s code:

npm install @moorage/plugin-popups
// astro.config.mjs
import { formsPlugin } from "@emdash-cms/plugin-forms"; // only for forms in popups
import { popupsPlugin } from "@moorage/plugin-popups";
import emdash from "emdash/astro";

export default defineConfig({
  integrations: [emdash({ plugins: [formsPlugin(), popupsPlugin()] })],
});

It needs EmDash 1.3.0 or newer, and the official forms plugin, 0.2.11 or newer, only if you want forms in popups (earlier versions save a ticked consent box as unticked). Your layout must render EmDash’s head and body components (EmDashHead, EmDashBodyStart, EmDashBodyEnd), as every EmDash template already does.

Then open Popups, under Marketing in the admin. For a popup that opens on a click, link to /#popup-<name> (also as a menu item’s custom link) or add data-popup="<name>" to a button; the admin shows the name to copy.

Screenshots

The Popups page: every popup with its kind, its status and where it shows, with Edit and Preview on each row.
The Popups page in the admin, with the tabs Popups, Results and Settings, a New popup button and a table of four, each row with its name, kind and status, the buttons Edit and Preview, and where it shows: Monthly letter, a popup with a form, on every page; Christmas cakes, a slide-in, on until 24 December; Boxing Day hours, a top bar, on until 27 December; and Letter box, a box in a page with a form, where it is placed. Notes under the table say each popup’s results are on its own page and the Results tab compares them, and that at most one popup or slide-in opens per visit and never while the cookie banner is waiting; at the foot, below a rule, the help line: Help, More free plugins, by Moorage.
A popup’s own page starts with its status, Turn off and Preview, then how it is doing for the period you pick.
The top of one popup’s page, Monthly letter: an All popups button, the line On · Popup with a form · every page, after they have read a while, with Turn off beside it, and the buttons Preview on your site and More. Under Results, a Period list set to Last 30 days, the dates compared, and two tiles: Sign-ups 96, up from 35; Rate 4%, no change. Below them a bar chart of sign-ups per day, a line saying it was seen 2,484 times and closed 745 times without signing up, and the buttons Compare popups and Download CSV.
The whole page: Results, one form under Edit with one Save changes, and Delete popup at the foot.
The whole page of the popup Monthly letter, from top to bottom: All popups; the name with the line On · Popup with a form · every page, after they have read a while, and Turn off; Preview on your site and More; Results for the last 30 days with Sign-ups 96 and Rate 4%, a chart, Compare popups and Download CSV; then Edit, one form with the heading, text, picture, a form from Forms called Newsletter, the thank-you heading, the words to say no, when it opens, where, phones and computers, show it again after a month, the start and end dates and times, and a Save changes button; Preview in dark mode; a red Delete popup button at the foot; and the help line: Help, More free plugins, by Moorage.
A top bar for short news such as opening hours, above the site’s header.
The home page of a demonstration site with a thin grey top bar above its header: Open on Boxing Day, 10:00 to 14:00, a See all opening hours link and a close button at the right end.
A popup with a sign-up form from Forms. On a phone it opens as a sheet at the bottom.
A popup over a demonstration bakery site: a picture of loaves, the heading Fresh from the oven, once a month, a short text, email address and first name fields, a Join the list button, a No thanks link and a close button. The page behind it is dimmed.
A box in a page, placed by an editor with the Popups box block.
A blog post on a demonstration bakery site with a box placed in the text: Get the Journal by email, a short text and a sign-up form with email address and first name.
A new popup starts with what kind it is, each kind explained in a line; three more steps follow.
The first step of a new popup, with the steps What kind, What it says, When and where, and Dates and turn on: a name, and four kinds to choose from, each explained in a line: Top bar, a thin strip across the top of the page; Slide-in, which slides in at a bottom corner and opens by itself; Popup, which opens by itself over the page, in the middle of the screen; and Box in a page, which sits inside a page or post where you place it while editing, with the Popups box block. Then the buttons Next: what it says and Cancel, and the help line: Help, More free plugins, by Moorage.
The Results tab puts every popup side by side for the same period.
The Results tab of the Popups page, headed How your popups compare: a Period list set to Last 30 days, four tiles with the totals (Seen 4,190, Sign-ups 96, Button clicks 107, Closed 1,256), a table with one row per popup (seen, sign-ups or clicks, rate, closed and seen on phones; the top bar and the box show dashes), a Download as a spreadsheet (CSV) button and notes on how the numbers are counted; at the foot, the help line: Help, More free plugins, by Moorage.

What it does not do

  • No A/B tests, countdowns, “spin to win”, full-screen takeovers or exit intent on phones.
  • No custom CSS, and no colours, fonts or sizes per popup: one look for all of them.
  • It does not build forms. Make the form under Forms, then name it here. Forms with Cloudflare Turnstile or a file upload only work in a box in a page for now.
  • There is no automatic box after every post: an editor places the block where it should go.
  • No targeting by referrer, country or role, and no language variants.

Permissions

It is a native plugin: it runs in your site’s own process, like any package your site uses, because adding scripts to pages is not something a sandboxed plugin is allowed to do. It keeps its popups, settings and daily counts in your site’s database, and nothing about any visitor. In the visitor’s browser it remembers only that they closed a popup or signed up, and never sends that anywhere.

Questions

Is it free?

Yes, on any number of EmDash sites, with no account and no key. It is open source under the MIT License; the licence page says in plain words what you may do with it.

Will popups hurt my Google ranking?

On phones a popup opens as a sheet at the bottom, never as a popup over the page on arrival, and it never covers the first page of a visit. That follows Google’s guidance on intrusive interstitials.

Do I need a cookie banner for it?

It sets no cookies. It remembers in the visitor’s own browser storage that they closed or signed up, so it does not ask again, and it never sends that anywhere.

How do I change a popup after it is made?

Click Edit next to it in the list. Turn on or off sits beside its name; under Edit, one form holds what it says, when and where it opens, and its dates, with one Save changes at the end. If something cannot be saved, every problem is listed together and what you typed stays. The name and kind are under More, then Change name or kind, and Delete popup is at the foot of the page.

How do I see how a popup is doing?

Click Edit next to it in the list. Results opens on the last 30 days; pick another period, such as This month, under Period. You see sign-ups or clicks and the rate, each with the change from the period before, a chart a day, and how often it was seen and closed. Compare popups opens the Results tab, with every popup side by side for the same period.

Can I see which popup a sign-up came from?

Yes. Under Forms, add a hidden field named utm_campaign to the form, and Popups fills in the popup’s short name when someone signs up through it. It shows when you open the sign-up under Submissions, and in Lead Delivery. Hidden fields named utm_source, utm_medium and page_url are filled in too.

A change I made does not show.

Cached pages refresh within a few minutes. The dates travel with the page, so a popup that has ended stops showing even on a cached page.

My popup with a form never opens.

Open the Popups page: a red warning names the problem, such as a deleted form or one that uses Turnstile or a file upload. The preview link says why a real visitor would not see it.

My popup is not in the list when I add a Popups box to a post.

The list shows only popups made with the kind Box in a page. Popups, slide-ins and top bars open by themselves and are not placed in a post; when there is no box yet, the list says how to make one. Make a new one under Popups and choose Box in a page, or an admin can change a popup’s kind with Change name or kind. A box that is turned off shows with “(off)”.

Why is it not in the EmDash registry?

The registry only takes sandboxed plugins, and sandboxed plugins cannot add scripts to pages. Showing popups is this plugin’s whole job, so it is added in code instead.

What is the line at the foot of the plugin’s page?

Only admins see it: “Help · More free plugins · by Moorage”. Help opens the plugin’s setup guide; editors never see the line. To hide it, switch on “Hide the help line at the foot of this page” at the bottom of the Settings tab and press Save.

Where do I report a problem?

Open an issue on GitHub. If it is a security problem, write to security@moorage.dev instead.

Report a problem on GitHub: what happened, and your EmDash and plugin versions.

What should we make next?

Tell us the job you would like a plugin to do. We read every answer and use your email only to reply to it; release emails come only if you tick the box.