Popup Mode on Wix
Add a popup form to your Wix website that appears as an overlay. This method uses Wix's Tracking & Analytics feature to add site-wide code.
Implementation Steps
Step 1: Get Your Embed Code
- Go to your form's Embed page
- Select Wix Website
- Choose Popup as the display mode
- Copy the generated code
Step 2: Access Wix Settings
- Log in to your Wix Dashboard
- Select your website
- Click Settings in the left sidebar
- Scroll down to Advanced section
- Click Custom Code
Step 3: Add Custom Code
- Click + Add Custom Code at the top right
- Paste your embed code in the code box
- Name your code: "Interactive Form Popup"
- Choose where to add the code: Body - end
- Select pages: All pages or specific pages
- Click Apply
Step 4: Configure Trigger
The embed code includes trigger configuration. You can customize it:
<script src="https://cdn.interactiveform.com/embed.js"></script>
Step 5: Publish Your Site
- Click Publish in the top right
- Visit your live site to test the popup
Trigger Options
Button Click
<script>
InteractiveForm.init({
formId: 'YOUR_FORM_ID',
mode: 'popup',
trigger: 'button',
triggerSelector: '#open-form-button'
});
</script>
Time Delay
<script>
InteractiveForm.init({
formId: 'YOUR_FORM_ID',
mode: 'popup',
trigger: 'time',
delay: 5000 // 5 seconds
});
</script>
Scroll Depth
<script>
InteractiveForm.init({
formId: 'YOUR_FORM_ID',
mode: 'popup',
trigger: 'scroll',
scrollPercent: 50
});
</script>
Exit Intent
<script>
InteractiveForm.init({
formId: 'YOUR_FORM_ID',
mode: 'popup',
trigger: 'exit-intent'
});
</script>
Customization for Wix
Match Wix Theme Colors
<script>
InteractiveForm.init({
formId: 'YOUR_FORM_ID',
mode: 'popup',
trigger: 'button',
triggerSelector: '#open-form-button',
style: {
primaryColor: '#116DFF', // Wix default blue
fontFamily: 'Madefor, sans-serif' // Wix default font
}
});
</script>
Responsive Settings for Wix
<script>
InteractiveForm.init({
formId: 'YOUR_FORM_ID',
mode: 'popup',
trigger: 'button',
triggerSelector: '#open-form-button',
responsive: true,
mobile: {
fullScreen: true // Better for Wix mobile view
}
});
</script>
Show Popup on Specific Wix Pages
Option 1: Using Custom Code Page Selection
When adding custom code in Wix:
- Choose Load code on selected pages
- Select specific pages from the list
Option 2: Using JavaScript
<script>
// Only show on specific pages
var currentPath = window.location.pathname;
var allowedPaths = ['/home', '/products', '/services'];
if (allowedPaths.some(path => currentPath.includes(path))) {
InteractiveForm.init({
formId: 'YOUR_FORM_ID',
mode: 'popup',
trigger: 'time',
delay: 3000
});
}
</script>
Wix-Specific Considerations
Wix Editor vs Editor X
- Wix Editor: Use Element ID for trigger selectors
- Editor X: Supports both CSS classes and IDs
Wix Mobile Editor
Test your popup in Wix's mobile editor:
- Click Mobile icon in top bar
- Switch to mobile view
- Test popup functionality
- Adjust mobile-specific settings if needed
Wix Multilingual Sites
For multilingual Wix sites:
<script>
// Detect Wix language
var lang = document.documentElement.lang || 'en';
InteractiveForm.init({
formId: 'YOUR_FORM_ID',
mode: 'popup',
trigger: 'button',
triggerSelector: '#open-form-button',
language: lang
});
</script>
Testing in Wix
Preview Mode
- Click Preview in Wix Editor
- Test popup triggers
- Verify form displays correctly
- Check mobile responsiveness
Published Site
- Publish your site
- Test on actual devices
- Check different browsers
- Verify form submissions work
Troubleshooting
Popup doesn't appear
- Verify custom code is added to correct location (Body - end)
- Check that code is applied to correct pages
- Ensure Element ID matches trigger selector
- Check browser console for errors
Button doesn't trigger popup
- Verify Element ID is set correctly on button
- Use
#prefix for ID selectors - Check that button is not inside a link
- Test with different trigger types
Popup appears behind Wix elements
- Wix elements may have high z-index
- Contact support for z-index adjustment
- Try using time or scroll trigger instead
Form not responsive on mobile
- Test in Wix mobile editor
- Enable fullScreen mode for mobile
- Check Wix mobile settings
Best Practices for Wix
- Use Element IDs: More reliable than CSS classes in Wix
- Test in Preview: Always test before publishing
- Mobile First: Check mobile view in Wix editor
- Page Load: Use time delay to ensure Wix loads completely
- Wix Apps: Ensure no conflicts with other Wix apps
Next Steps
- Learn about Float Button on Wix
- Learn about Inline embedding on Wix
- Explore Manual Embedding for more control