Mailjet popup form trigger: how to edit it or replace it
If a Mailjet popup form loads but never appears and offers no trigger settings, the cause is usually script timing, a client-side route change, or a stored dismissal. Test in a private window, load the script with next/script, and if the trigger can't be edited, show your own form and post to Mailjet's API.
Sohail Hussain9 min readShort answer
- A Mailjet popup that loads but never shows on a Next.js site is usually a timing or page-lifecycle problem: load the script with next/script, hard-reload the exact URL, and clear any stored dismissal.
- If the form's settings offer no trigger control, build your own popup with the delay or scroll rule you want, and send the address to Mailjet from your server using the contact-list method in Mailjet's current API reference.
The complaint, in the words people use: the Mailjet popup script loads, the form never appears, the trigger section has no editable options, the docs feel thin, and support is slow to answer.
Users report exactly this combination, and I can't confirm what Mailjet's form builder offers in your account today, so I won't give click paths for it. Check your own form's display settings and Mailjet's current documentation; the steps below work either way.
Why the popup doesn't show
Causes, most common first:
- Script runs at the wrong time. Many embed scripts arm their trigger on
DOMContentLoadedorwindow.onload. If Next.js injects the script after those events, the handler never runs. - Raw script tag in a component. React doesn't execute scripts rendered as plain tags, and anything injected into React-managed markup can be wiped during hydration.
- Client-side route changes. Popup scripts are usually written for full page loads. In Next.js a link click swaps the page without a reload, so a "show on page load" rule may evaluate once, on the first page only.
- Stored dismissal. Many popup tools remember a close or submit in a cookie or local storage. I don't know the keys Mailjet's script uses, so I won't guess them.
- Blocking. Ad blockers, privacy extensions or a Content Security Policy can stop the script or its requests.
- Unknown trigger settings. If the form has no trigger options, the display rule may be fixed or missing. Only Mailjet can confirm that.
| Symptom | Likely cause | Fix |
|---|---|---|
| Script request blocked or failed | Ad blocker or CSP | Test with extensions off; update CSP |
| Works on reload, not after clicking a link | Client-side route change | Own trigger, or load only on full-load pages |
| Works in a new private window only | Stored dismissal | Clear site data |
| Script loads, no popup node in the DOM | Trigger never armed | Change load strategy, or build your own |
| Node exists but is invisible | CSS or z-index | Inspect styles on the container |
Confirm the script is loading at all
Open the page in a private window with extensions off, then open DevTools.
- In the Network tab, filter by the script's hostname and reload. A 200 response means it loaded.
- In the Console tab, look for
Refused to load the scriptorContent Security Policyerrors. If your Next.js app sets a CSP header, add the script host toscript-srcand the host it posts to intoconnect-src. - In the Elements tab, search for the popup's container. If the node exists but is hidden, the trigger fired and CSS is the problem. If it doesn't exist, the script never ran its trigger.
Ad blockers are a common reason a popup works in one browser and not another. Test with them off before changing code.
Fix script placement in Next.js
Load the script with next/script in your root layout:
// app/layout.tsx
import Script from "next/script";
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<body>
{children}
<Script
src="https://YOUR-FORM-SCRIPT-URL-FROM-MAILJET.js"
strategy="afterInteractive"
/>
</body>
</html>
);
}
Use the exact script URL from your form's embed code. The layout persists across navigations in the App Router, so the script loads once.
If the vendor snippet waits for DOMContentLoaded or window.onload, try strategy="beforeInteractive" in the root layout so it registers its handlers before those events fire. If that still fails, skip the vendor trigger (see below).
Test the exact URL
Hard-reload the exact page where you expect the popup. If it appears on reload but not after navigating from another page, the script doesn't handle client-side routing.
Check route changes in a single-page app
You can't fix route handling from inside the vendor script. Your options are your own trigger, or loading the form only on pages where a full load is guaranteed, for example a landing page linked from outside your site.
Rule out a stored dismissal
Test in a fresh private window, or clear site data for your domain in DevTools under Application, then reload. If you tested the popup repeatedly while building the site, this alone can explain "it never appears."
Replace the vendor trigger with your own
If the display settings truly offer no trigger control, show your own form after a delay or scroll depth and send the address to Mailjet from your server. Keep your Mailjet API key and secret on the server; never put them in browser code.
The server route below is a skeleton. Mailjet's endpoint, authentication details and the contact action you want are in Mailjet's API reference for managing contacts in a list; I haven't verified them here, so fill in the marked parts from that reference.
// app/api/subscribe/route.ts
export async function POST(req: Request) {
const { email } = await req.json();
if (typeof email !== "string" || !/^\S+@\S+\.\S+$/.test(email)) {
return Response.json({ error: "Invalid email" }, { status: 400 });
}
// TODO: copy the endpoint, auth scheme and request body for adding
// a contact to a list from Mailjet's current API reference.
const res = await fetch("{MAILJET-ENDPOINT-FROM-API-REFERENCE}", {
method: "POST",
headers: {
Authorization: "{AUTH-HEADER-BUILT-FROM-SERVER-ENV-VARS}",
"Content-Type": "application/json",
},
body: JSON.stringify({ Email: email /* plus fields the reference requires */ }),
});
return Response.json({ ok: res.ok }, { status: res.ok ? 200 : 502 });
}
Client popup with a 10-second delay and a remembered dismissal:
// components/signup-popup.tsx
"use client";
import { useEffect, useState } from "react";
export default function SignupPopup() {
const [open, setOpen] = useState(false);
const [done, setDone] = useState(false);
useEffect(() => {
if (localStorage.getItem("signup-popup-dismissed")) return;
const t = setTimeout(() => setOpen(true), 10000);
return () => clearTimeout(t);
}, []);
function close() {
localStorage.setItem("signup-popup-dismissed", "1");
setOpen(false);
}
async function onSubmit(e: React.FormEvent<HTMLFormElement>) {
e.preventDefault();
const email = new FormData(e.currentTarget).get("email");
const res = await fetch("/api/subscribe", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ email }),
});
if (res.ok) setDone(true);
}
if (!open) return null;
return (
<div role="dialog" aria-modal="true">
{done ? <p>Thanks, you're in.</p> : (
<form onSubmit={onSubmit}>
<input name="email" type="email" required placeholder="you@example.com" />
<button type="submit">Subscribe</button>
</form>
)}
<button onClick={close} aria-label="Close">Close</button>
</div>
);
}
Mount it once in the root layout. Because it's your component, the trigger is whatever you code: delay, scroll depth, exit intent, or a button.
Two things you now own
Consent: check whether your signup path needs a confirmation step and what your local law requires, because a custom form skips whatever the vendor's form did for you. Accessibility: a real modal needs focus handling and Escape to close, which this sketch leaves out.
For background, see double opt-in and CAN-SPAM for US basics.
When the form lives on a site builder
People using Cargo have reported that a Flodesk inline form script disappeared from the page, and that the vendor offered no alternative to the script. I can't say whether that has changed as of November 2026. Site builders that strip or sanitize custom scripts will break any embed that relies on one, whichever email vendor it comes from.
Options that don't depend on script execution: link to the vendor's hosted signup page from a button, or use an iframe embed if the builder allows iframes. On a locked-down builder you can't run your own server code, so the hosted-page link is usually the one that survives.
Checklist before you try again
- The script URL is copied exactly from the form's embed code.
- The script loads through
next/scriptin the root layout. - No CSP, ad blocker or extension blocks the script or its requests.
- You tested in a private window, so no stored dismissal applies.
- You hard-reloaded the exact URL, not just clicked through from another page.
- The popup container exists in the DOM; if it does, you checked its CSS.
If nothing works
Contact Mailjet support. Slow replies were part of the complaint, so make the ticket easy to act on: page URL, form ID, framework (Next.js App Router or Pages Router), a screenshot of the Network tab showing the script request, and any Console errors. Say that the form loads, the trigger never fires, and that you tested in a private window with extensions disabled.
Subject: Popup form loads but never displays (form ID {form-id})
Hello,
My Mailjet popup subscription form script loads (HTTP 200 in the Network tab) on https://{your-domain}/{page}, but the popup never appears. The form's settings show no editable trigger options.
Framework: Next.js ({App Router or Pages Router}); script loaded with next/script, strategy afterInteractive.
Tested in a private window with extensions disabled. Console errors: {paste errors or "none"}.
1. Which display trigger does this form use by default?
2. Can the trigger be edited, and where?
3. Is the script supported on single-page apps with client-side routing?
Screenshots attached.
Common questions
Can I edit the trigger on a Mailjet popup form?
I can't confirm what your account's form builder offers today. Check the form's display settings and Mailjet's docs; if no trigger option exists, build your own trigger as shown above.
Why does the popup show on reload but not after I click a link?
Next.js swaps pages without a full reload, and many popup scripts only evaluate their rule on the first load. A custom component mounted in the root layout avoids this.
Is it safe to call Mailjet's API from the browser?
No. Your API key and secret would be visible to anyone. Post the address to your own server route and call Mailjet from there.
What if my site builder strips custom scripts?
A button linking to a hosted signup page, or an iframe if the builder allows one, is the most reliable route. For popup patterns regardless of vendor, see email pop up examples.
If you ever move to Mailneo, note that it has no hosted signup-form or popup builder; forms reach it through a public subscribe API for public lists or the Tally integration (see the integrations docs).
Explore: Email Automation
Related Articles
Acumbamail lifetime deal: worth it with these automation limits?
Acumbamail's lifetime deal can still suit plain newsletters, but reviewers report it lacks IF-this-then-that automation and date triggers such as birthdays. Test those two things in your own account before you build around it, and move off only if your plans need conditional logic.
Best Way to Remember Sales Follow-Ups With a Small Team
Stop relying on memory. Log email automatically from Outlook, give every contact exactly one next-follow-up date, and give managers a view of everything overdue. Any CRM, or even a disciplined spreadsheet, can do this. What matters is low-friction logging, not a bigger pipeline screen.
Email sequence tool priced by emails sent, not contacts
If contacts finish your sequence and still count against your plan, you have three options: export and delete completed contacts, pick a tool that bills per send, or send through your own SMTP provider. Work out your monthly sends first; 100 new contacts a day on 5 steps is about 15,000 emails.
Flodesk pause workflow: what happens to subscribers inside
A Capterra reviewer was unsure whether pausing a Flodesk workflow to edit it disrupts subscribers already inside. That behavior isn't something I can confirm from documentation I'm certain of. Test it with your own addresses, then ask Flodesk support four specific questions before touching real subscribers.
Ready to supercharge your email marketing?
Start sending smarter emails with AI-powered campaigns. No credit card required.
Get Started Free