# Framer Popup: How to Add One With Custom Code

> Add an email or offer popup to a Framer site: build it on the canvas or paste a script into the site's custom code, then set triggers, pages and test it live.

By Aleksan Aharonyan, November 17, 2026. Original: https://popupgenius.app/blog/framer-popup/

To add a popup to a Framer site, you either build an overlay on the Framer canvas and open it with a click, or paste a popup tool's script into the custom code section of your site settings, at the end of the body, so it loads on every page. The canvas route is right for a modal a visitor opens on purpose, such as a video or a contact form behind a button. The script route is right for a popup that opens on its own, at a moment you choose, and collects emails you can export. This guide covers the script route step by step, then how to check it on the live site.

## Key takeaways

- Use a canvas overlay for a modal opened by a click, and a script for a popup that opens on exit intent, scroll or a timer and collects signups.
- Paste the script once, site-wide, at the end of the body in your site's custom code settings, then publish, and choose the pages in the popup tool rather than in Framer.
- Register the address your visitors use with your popup tool, because a Framer subdomain and your custom domain are different addresses.
- Check whether your Framer plan allows custom code before you build, since that setting decides whether the script route is open to you.

## Canvas overlay or script: which one you need

A Framer popup built on the canvas is an overlay you design like any other element and open with an interaction, usually a tap on a button. It looks exactly like your site because it is your site, and it needs no other account.

What a canvas overlay does not give you on its own is behavior that depends on the visitor: opening when the mouse heads for the browser tabs, opening once a reader is halfway down an article, showing once per visit and then staying away, or keeping a list of the email addresses submitted through it. A script-based popup brings that behavior with it. It is designed in a separate tool and loaded by one script tag, so it is not an element in your Framer project and never gets in the way of a redesign.

If your popup is opened by a button and holds a message or a video, build it on the canvas and stop here. If it should open on its own and collect emails, the steps below are for you.

## Step 1: decide the popup's job

Write down the offer and the moment before you design anything, because the moment decides the trigger.

- **A newsletter or waitlist.** Common on Framer sites for products and startups. The offer is early access, launch news or a monthly update, and the moment is after the visitor has read enough to care, such as halfway down the home page.
- **A lead magnet.** A guide, a template or a checklist for a studio or a consultant. Shown on relevant blog posts after a reader has scrolled into the article.
- **A last word before leaving.** A demo booking link or a short offer, shown on exit intent on desktop.

One popup, one offer and one trigger is the right start. Add a second popup only after the first one has had time to show whether it works.

## Step 2: check your plan and your domain

Framer's site settings have a custom code section where you can add code at the start or end of the head and the body. Whether you can use it depends on your Framer plan, so open your site settings and check that the custom code section is available before you design the popup elsewhere.

Next, decide which address the popup belongs to. A Framer site can be published on a Framer subdomain, on a custom domain, or both. Most popup tools tie popups to one registered site address and show them only there. Register the address your visitors actually use, which for a live business is usually your custom domain.

## Step 3: create the popup and copy its script

Build the popup in your popup tool, then copy the script tag it gives you.

With [PopupGenius](https://app.popupgenius.app/account/signup), for on-brand upsell and email popups on your website, you register your Framer site's address and it reads the colors and fonts of your home page, so the first draft already matches the typography you chose in Framer. It is added with one script tag before the closing body tag, and the free plan needs no card.

Keep the form short. An email field alone is easiest on a phone. Add a first name only if your first email uses it. Then design the step after signup: the code, the download link, or a line telling the visitor when the first email arrives.

## Step 4: paste the script into Framer's custom code

Put the script on every page, once, at the end of the body. That is where popup scripts normally ask to go, and it keeps the script from holding up your page while it loads.

1. Open your site settings in Framer and find the custom code section.
2. Paste the script tag into the field for the end of the body.
3. Save the setting.
4. Publish the site, so the live version carries the code.

If you also see a custom code field in a single page's settings, you usually do not need it. A site-wide script with page rules in the popup tool is easier to change later: in PopupGenius that is a URL rule on the popup, such as only pages whose path starts with /blog/, or every page except /contact. Do not paste the script both site-wide and on a page, or it loads twice.

## Step 5: set the trigger and the frequency

The trigger is when the popup opens, and the frequency is how often one visitor sees it. These two settings decide whether a popup feels useful or intrusive.

- **Scroll depth** waits until the visitor has read part of the page. It is the best first trigger on a home page or an article.
- **Exit intent** opens when the mouse leaves through the top of the window. It needs a mouse, so pair it with scroll or a timer for phone visitors. The [exit-intent popup guide](/blog/shopify-exit-intent-popup/) covers which offers are worth that interruption.
- **A timer** opens after a number of seconds. Use it as a backstop next to scroll rather than alone.

As a starting point to test, use scroll around halfway down the page with exit intent beside it, and show the popup once per visit. The [email popup timing guide](/blog/shopify-email-popup-timing/) explains why a popup that opens on page load tends to cost signups, and it applies to a Framer site as much as to a store.

If your Framer site already uses code components, you can also let your own code decide the moment. A popup tool with a custom event trigger opens the popup when your code fires the event you named, for example after a visitor finishes an interactive demo.

## Step 6: test on the live site

Framer's preview shows your design, but the popup belongs to the published site, so test there.

1. Open your registered address in a private or incognito window, so earlier visits are not remembered.
2. Do what the trigger waits for: scroll, wait, or move the mouse toward the tabs.
3. Submit the form with an address you can check, and confirm the thank-you step appears.
4. Repeat on a phone, and check the close button is easy to tap and the popup does not cover your main call to action.
5. Confirm the test signup arrived in your popup tool's lead list.

If the popup does not appear, check in order: the site was published after you added the code, the script is in the end-of-body field, the popup is published in the tool, and you opened the address you registered rather than a different one.

## Where the signups go

Signups from a script-based popup stay in the popup tool until you move them. Plan that before launch. You can download the list as a CSV file and import it into the tool you send email from, or send each new signup on as it arrives through a webhook into an automation service. The second route means your welcome email goes out while the visitor still remembers signing up.

## FAQ

### Can I make a popup in Framer without code?

Yes. Build an overlay on the canvas and open it with an interaction such as a button tap. That covers a modal the visitor opens on purpose. A popup that opens on its own on exit intent or scroll, limits how often it shows and keeps a lead list needs a script, which goes in the site's custom code settings.

### Will a popup script slow down my Framer site?

Placed at the end of the body, the script loads after the content the visitor came for. PopupGenius, for example, loads deferred, after the page, so it does not block rendering. Check your page speed before and after if you want to see the difference on your own site.

### Can I show the popup only on my Framer blog?

Yes. Keep the script site-wide and set a URL rule in the popup tool so it shows only on pages whose path starts with your blog's path, such as /blog/. You can change the rule later without opening Framer again.
