How to add a popup to Joomla

To add a popup to Joomla, paste Popupsmart's embed code into your site template's index.php, just before the closing </body> tag, then build and publish popups from the Popupsmart dashboard. Joomla core has no popup builder, and Popupsmart runs outside Joomla, so there's no popup module to install or update.

Put the code in a child template, so a Joomla update can't overwrite it.

Add a popup to Joomla
Joomla logoPopupsmart logo

Setup at a glance

Runs on
Joomla
Where the code goes
System → Site Templates → index.php → before </body>
Add-on
No module needed

Before you start

You need three things:

  • Access to your Joomla administrator with permission to edit site templates. If you haven't bookmarked it, add /administrator to your site's address.
  • 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.

The screenshots show Joomla 4 with its default template, Cassiopeia. Joomla 5 and 6 use the same System → Site Templates path, which Joomla's Cassiopeia guide documents for Joomla 4 and later.

How to add a popup to Joomla

A Joomla popup from Popupsmart needs one embed code in your site template's index.php, added once, just before the closing </body> tag. After that you build, change and publish popups in Popupsmart without opening Joomla again.

Step 1: Create your Popupsmart account

Create a free Popupsmart account, or sign in to the one you have.

register popupsmart

Step 2: Copy your embed code

In the Popupsmart dashboard, click Embed Code in the left-hand menu.

embed code

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

copy embed code

Step 3: Open your site template

In the Joomla administrator, click System in the left-hand menu.

joomla system section

Under Templates, click Site Templates.

site templates section on joomla

Click the details and files link of the template your site uses, Cassiopeia Details and Files in the screenshot.

templates page on joomla

A Joomla update can overwrite changes to a core template such as Cassiopeia, while a child template's files are not affected by updates. If your template updates with Joomla, use Create Child Template at the top of the next screen and make the change in the child.

Step 4: Paste the code before the closing body tag

In the template's Editor tab, click index.php.

Selecting index.php in the Joomla template files

Scroll to the end of the file and paste the embed code just before the </body> tag, then click Save & Close. When I help with a Joomla install, I clear the cache under System → Clear Cache right after saving, so a cached page can't hide the new line while you test.

adding popupsmart embed code on joomla

Step 5: Add and verify your website

Back in Popupsmart, hover over the profile icon at the bottom left and click Websites.

websites popupsmart

Click + New Website.

new website popupsmart

Enter your Joomla site's address and click Save.

adding joomla website

Once Popupsmart finds the code on your site, the website shows as Verified.

verified joomla site

If it 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 6: Create your popup

Click + New Campaign. Name the campaign, choose your Joomla website and click Next.

new campaign

Pick a template. Change its copy, colours and form fields in the Customize and Style steps, choose who sees it in Segment, and click Save.

Step 7: Publish and check the popup on your site

Open the Publish step and click Publish. Then open your site in a private window. The popup appears when its trigger fires.

publishing joomla popup

Does Joomla have a built-in popup?

No. Joomla core doesn't include a popup builder; Joomla popups come from extensions, listed in the Joomla Extensions Directory's Popups & iFrames category and installed site by site.

A popup module is a fair choice if all you need is one simple modal on one site, and it keeps everything inside the Joomla administrator. The trade-off is upkeep: a module lives inside your Joomla install, so you install it, keep it updated with Joomla and set it up again on every site. Popupsmart lives outside Joomla: one line of code per site, with the templates, targeting rules and lead delivery managed from one dashboard for every site you run, whether it runs Joomla, WordPress or Shopify. A paid Popupsmart plan covers several websites, from 3 on Basic to unlimited on Expert.

How to add a video pop up on Joomla

A video pop up on Joomla works like any other Popupsmart popup: the embed code in your template loads it, and the video is a YouTube element inside the popup. Nothing about the video touches Joomla itself.

  1. Click + New Campaign, choose your Joomla website and pick a template or a blank one.
  2. On the Customize step, click Add a new element and choose YouTube.
  3. Click the element, paste the link into YouTube Video URL, add a cover image, and turn Autoplay (muted) on or off.
  4. Set the size in Style, check the mobile view, then save and publish.

Popupsmart's video element takes YouTube links only, according to the help center's video popup guide. For ideas on where a video popup earns its place, see Popupsmart's guide to video popups.

How do you show a popup only on some Joomla pages?

Leave the embed code in the template and choose the pages in Popupsmart. The code only loads Popupsmart; which pages show a popup is a targeting rule on each campaign, such as "the URL contains /blog" or "the visitor is about to leave". The help center explains the rules in Popupsmart's targeting options. You can move a popup to other pages later without editing the template again.

Pages are half of the rule; timing is the other half. Across 500 Popupsmart campaigns analysed in 2026, 95.4% fire as soon as the page loads and only 2.0% use exit intent, according to the exit-intent study. When a popup fires is the setting most people leave on default, so choose the trigger when you choose the pages.

Joomla runs company sites, associations, schools and community portals, so start from the job the page has:

Send Joomla popup leads to your email marketing tool

A Joomla popup's leads belong in your email marketing tool, not in Joomla. Popupsmart keeps every submission in the Leads section of your dashboard and can send it on to the email or CRM tool you already use; you connect it in the campaign's Integration section.

The Brevo 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. Popupsmart collects the contacts; your email tool sends the newsletters.

Does a popup slow down a Joomla site?

A Popupsmart popup doesn't hold up your Joomla pages: the embed code loads asynchronously (async defer) from the end of the page, so the browser finishes building your page before it fetches Popupsmart. Nothing runs on the Joomla server side: no extension is called when a page is rendered.

When a Joomla popup doesn't appear, work down this list; the first three causes are specific to Joomla.

  • The page uses a different template. Template styles of the same template share its index.php, but a page assigned to another template needs the code in that template too.
  • An update replaced the file. If you edited a core template, open index.php again and check the code is still before </body>.
  • A cache is serving the old page. Clear Joomla's cache under System → Clear Cache, and any CDN cache in front of the site.
  • The website isn't verified. A campaign runs only on a verified website; see Step 5.
  • The address doesn't match. www.example.com and example.com are different sites to a browser. Add the address your visitors actually use.
  • 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.
💬
From the support queue: When a Joomla popup shows on some pages and not others, what I check first is which template each page uses. Template styles of one template share its index.php, so they're covered, but a menu item assigned to a different template isn't. My advice is to open System → Site Templates, note every template your menu items use, and add the line to each of them, or to a child template of each.

Still stuck? Contact Popupsmart support with your site's address and the campaign name.

Joomla popup FAQ

Is there a free way to add a popup to Joomla?

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 a Joomla site.

The Popupsmart pricing page compares it with the paid plans.

Do I need a Joomla popup module?

No. Popupsmart runs from the embed code in your template, so there is nothing to install from the Joomla Extensions Directory and nothing to update when Joomla updates. A popup module is still a fair choice for one simple modal on one site.

Does this work on Joomla 5 and Joomla 6?

Yes. The embed code is one line of HTML in the template, so the Joomla version doesn't change the method, and Joomla 4 and later keep templates under System, then Site Templates. The child-template advice in Step 3 applies to every version from Joomla 4 on.

Joomla 6 was released in October 2025, alongside Joomla 5.4. According to Joomla's release announcement, it also ships a Cassiopeia child template with extra colour and font options.

Will a Joomla update remove the embed code?

It can, if you pasted the code into a core template such as Cassiopeia, because an update may overwrite that template's files. A child template's files are not affected by updates, so put the code there, or check index.php after each update.

How long does it take to add a popup to Joomla?

The Joomla side is one paste into index.php and a save; 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 Joomla alone.