How to add a popup to Wix
Wix has its own lightbox feature, and for a simple announcement it works. For lead capture with exit intent, multi-step forms and delivery to your own tools, most people reach for an app or a script. PopupForge is the script route: one tag in Wix's Custom Code panel, everything else managed from PopupForge.
The important Wix-specific detail is where the code goes. The Embed HTML element in the editor renders inside a sandboxed iframe, so a script placed there cannot overlay the page. The Custom Code panel in the dashboard, which injects directly into the page, is what you want.
The script tag
<script src="https://getpopupforge.com/lead-modal.js?appId=YOUR_APP_ID&configId=YOUR_CONFIG_ID" async defer></script>Replace YOUR_APP_ID and YOUR_CONFIG_ID with the values from the install panel of your published popup. The tag is the same on every platform; only where you paste it changes.
Step by step
- 01
Build and publish the popup in PopupForge
Create a free account, generate or design the popup in the visual editor, set the trigger and frequency, then publish it. The install panel shows your script tag with the appId and configId already filled in. Copy that exact tag; the placeholder version on this page will not load a popup.
- 02
Confirm the site is published on a connected domain
Wix's help center states custom code needs a published site with a connected domain, which in practice means a premium plan. Sites on a free wixsite.com address will not run custom code. Check Wix's article and pricing page if you are unsure.
- 03
Open Settings > Custom code
From the Wix dashboard (not the editor) go to Settings and click Custom Code in the Development & integrations section. This is the same panel used for analytics and verification snippets.
- 04
Add the tag
Click + Add Custom Code, paste the PopupForge script tag, and give it a name such as "PopupForge". Under "Add code to pages" choose All pages and Load code once per visit. Under "Place code in" choose Body end. Click Apply.
- 05
Do not use the Embed HTML element
The editor's Embed HTML element loads its contents in an isolated iframe. A script inside it cannot draw over the rest of your page, so the popup would render inside a small box. Always use the dashboard Custom Code panel for PopupForge.
- 06
Publish if the site has unpublished changes
Custom Code applies to the live site, but if you also edited pages in the editor, click Publish so everything is consistent. Then load the live domain, not the editor preview.
- 07
Test the popup and check the lead arrives
Open the live site in a private browsing window so a previous session does not suppress the popup, trigger it the way you configured (wait for the delay, scroll, or move the pointer out through the top of the window), submit a test lead, then confirm it shows in the PopupForge lead list.
Wix notes and gotchas
- Wix Studio sites also have the dashboard Custom Code panel.
- Wix's own lightbox and the Wix cookie banner both overlay the page. Disable any Wix lightbox that fires on the same trigger so two popups do not compete.
- The editor preview does not run custom code. Test only on the published domain.
- If you later remove the premium plan or disconnect the domain, custom code stops running and the popup disappears with it.
Verify the install
Confirm the popup shows and the lead arrives
- 1.Open the published domain in a private window and search the page source for lead-modal.js.
- 2.Trigger the popup, submit a test lead.
- 3.Check the PopupForge lead list and analytics for the view and submission.
Official Wix documentation
Platform menus and plan rules change. If a step here no longer matches what you see, the official page above is the source of truth.
FAQ
Frequently asked questions
Can I add PopupForge to a free Wix site?
Not at the time of writing. Wix's help center says custom code requires a published site with a connected domain, and free sites on a wixsite.com address do not meet that. Check Wix's article for the current rules.
Why does the popup appear inside a small box?
Because the tag was pasted into an Embed HTML element, which runs in a sandboxed iframe. Remove it from the element and add it under Settings > Custom code > Body end instead.
Head, Body start or Body end?
Body end. The script is async and defer, so any placement works, but Body end keeps it out of the critical path and matches how PopupForge is installed on other platforms.
Can I limit the popup to specific Wix pages?
Yes, two ways. Wix lets you choose specific pages when adding the custom code, or you can leave it on all pages and use PopupForge's URL targeting rules (Pro targeting) so you can change the rules later without opening Wix.
Get your script tag
Generate a popup for your site, then paste one tag into Wix.
The free generator shows three brand-matched directions from your URL, no account needed. Creating an account gives you the visual editor, triggers, URL targeting and the install panel with your real appId and configId.