How to add a popup to ExpressionEngine
To add a popup to ExpressionEngine, paste Popupsmart's embed code just before the closing body tag in the layout template that wraps your pages, layouts/_html-wrapper in the default theme, and save it. Popupsmart then builds and publishes every popup from its dashboard, so there's no add-on to install or update.
Setup at a glance
- Runs on
- ExpressionEngine CMS
- Where the code goes
Developer → Templates → layouts/_html-wrapper → before </body>- Add-on
- No add-on needed
Before you start
Adding a popup to ExpressionEngine takes three things:
- Access to the ExpressionEngine control panel with permission to edit templates, or access to the template files if your team edits them outside the control panel.
- A free Popupsmart account. The free plan covers one website and one live popup, so you can finish this guide without paying.
- The address your visitors use for the site, which Popupsmart verifies after the install.
How to add a popup to ExpressionEngine
The embed code goes into the layout your templates share, once. After that, you build and change popups in Popupsmart without opening ExpressionEngine again.
Step 1: Copy your embed code
Sign in to Popupsmart, or create a free account, and click Embed Code in the left-hand menu.

Click Copy to clipboard. The code is one line, <script src="https://cdn.popupsmart.com/bundle.js" data-id="…" async defer></script>, and the data-id belongs to your account.

Step 2: Open your HTML wrapper template
In the ExpressionEngine control panel, click Templates under Developer in the left sidebar.

Under Template Groups, click layouts, then open the _html-wrapper template. These are the names ExpressionEngine's default theme uses. On a custom site, open the layout that holds your pages' <html> and <body> tags; templates call it with a {layout="…"} tag on their first line.

Step 3: Paste the code and save
On the Edit tab, paste the embed code just before the closing </body> tag and click Save.

ExpressionEngine also saves templates as files, by default under system/user/templates/. For the default theme, this layout is default_site/layouts.group/_html-wrapper.html there. My advice, when your team keeps those files in version control, is to make the same edit in the file itself, so the next deploy can't overwrite it.
Step 4: Add and verify your website
Back in Popupsmart, hover over the profile icon at the bottom left and click Websites.

Click + New Website.

Enter your site's address and click Save.

If the site shows as Unverified, click Unverified, then Verify website, and go back to the dashboard and click Refresh. The guide to verifying your website covers the other cases.
Step 5: Create your popup
Click the Popupsmart icon to open your campaigns, then click + New Campaign. Name the campaign, choose your ExpressionEngine website and click Save.

Pick a template, then change its copy, colours and form fields to match your site. Save as you go.

Step 6: Publish and check the popup on your site
Go to the builder's Publish step and click Publish. Then open your site in a private window and load a page that uses the wrapper; the popup appears when its trigger fires.

Does ExpressionEngine have a built-in popup?
No. The first-party add-ons listed in the ExpressionEngine add-ons overview cover jobs such as consent, email, search, RSS and statistics, and none of them shows a popup to visitors. ExpressionEngine's CP/Modal service is for add-on developers building control panel screens, not for your site's front end. Third-party add-ons come from the ExpressionEngine Add-on Store.
An add-on, or a modal your developer writes into the templates, keeps everything inside ExpressionEngine, and for one fixed message that may be enough. An add-on is installed on each site and updated with ExpressionEngine; a template modal needs a developer for every change. Popupsmart sits outside both: one line of code per site, with the templates, targeting rules and lead delivery managed from one dashboard for every site you run.
How do you show a popup only on some ExpressionEngine pages?
An ExpressionEngine popup reaches only the pages you pick when the embed code stays in the wrapper and each campaign carries its own targeting in the builder's Segment step. URL targeting limits a popup to addresses that contain or match what you set, such as /blog. That is easier to change than pasting the code into one section's template, and it keeps a single copy of the code on every page.
Choose the trigger in the same step. In Popupsmart's 2026 benchmark, popups that wait before appearing convert 0.83% against 0.61% for popups shown the instant the page loads (median campaign), a lean rather than a proven gap, and exit intent shows no statistically reliable advantage. When a popup fires is worth deciding on purpose for each campaign.
Popup ideas for an ExpressionEngine site
An ExpressionEngine popup works best when it matches the job of the page it sits on:
- Newsletter signups on blog and news entries: the email popup guide.
- An event or launch, with a countdown and a signup: the countdown popup recipe.
- Callback requests on service pages: the callback popup recipe.
Send your ExpressionEngine popup leads to your email tool
Popupsmart sends every email address and phone number a popup collects to the tool you already use, so the leads don't sit in a spreadsheet. You connect it in the campaign's Integration section. The Mailchimp popup guide and the MailerLite popup guide walk through a connection; the help center lists 19 destinations, and a webhook, Zapier or Make covers a tool that isn't one of them.
Does a popup slow down an ExpressionEngine site?
A Popupsmart popup doesn't hold up an ExpressionEngine page: the embed code loads asynchronously (async defer), so the browser finishes building your page before it fetches Popupsmart. ExpressionEngine does no extra work when it renders a page: the wrapper simply outputs one more line of HTML.
Popup not showing on ExpressionEngine? Check these
- The template doesn't use the wrapper. A template without a
{layout="layouts/_html-wrapper"}tag, or with a different layout, won't output the code. Add the code to that layout too. - A file deploy overwrote the edit. If templates are deployed as files, check that the file on the server contains the code.
- The website isn't verified, or the address doesn't match. Add the address your visitors actually use;
www.example.comandexample.comare different sites to a browser. - A cache is serving the old page. If template caching or a CDN is on, clear the cache after saving the template.
- The code is on the page twice. If you also pasted it into a section template, remove one copy.
- The trigger hasn't fired yet. An exit-intent or scroll trigger waits for the visitor to leave or scroll; test in a private window and behave like a visitor.
ExpressionEngine popup FAQ
Is there a free way to add a popup to ExpressionEngine?
Yes. Popupsmart's free plan is permanent, not a trial: one website, one live popup and 5,000 pageviews a month, with Popupsmart branding. It is enough to install the code and run your first popup on an ExpressionEngine site.
The Popupsmart pricing page compares it with the paid plans.
Do I need to know how to code to add a popup to ExpressionEngine?
No. You paste one line of code into your wrapper template once. Everything else, from the design to the targeting, happens in Popupsmart's visual editor, starting from a ready-made template.
Do I need an ExpressionEngine add-on for popups?
No. Popupsmart runs from the embed code in your wrapper template, so there is no add-on to install and nothing to update when you update ExpressionEngine.
Will the popup work with my ExpressionEngine templates?
Yes. Any template that outputs a closing body tag can hold the embed code. In the default theme that is the layouts/_html-wrapper layout; on a custom site it is whichever layout wraps your pages.
How long does it take to add a popup to ExpressionEngine?
The ExpressionEngine side is one line in one layout template; the rest is building the popup. Among people who published a campaign in the 90 days to 16 September 2026, the median time from signup to the first published campaign was 32.5 minutes, and 287 of 332 published within a day, according to Popupsmart's own product data. That figure covers every platform, not ExpressionEngine alone.

