Wix
Install the widget on your Wix website
Installing the Widget on Wix
Overview
This guide will walk you through installing our JavaScript widget on your Wix website. Wix offers multiple methods depending on your plan and needs.
Method 1: Using Custom Code (Recommended)
This method works for all Wix Premium plans and adds the widget to your entire site.
Step 1: Access Settings
- Log in to your Wix account
- Go to your Site Dashboard
- Click on Settings in the left sidebar
- Scroll down and click on Custom Code under Advanced Settings
Step 2: Add New Code
- Click + Add Custom Code button at the top right
- A popup window will appear
Step 3: Configure Your Widget
- Paste your code in the text box:
<script src="https://your-domain.com/widget.js"></script>
<script>
YourWidget.init({
apiKey: 'YOUR_API_KEY'
});
</script>
Replace
YOUR_API_KEYwith your actual API keyEnter a name for your code (e.g., "My Widget Script")
Add code to pages: Select All Pages (or choose specific pages)
Place code in: Select Body - end
Load code once: Leave this option selected (recommended)
Step 4: Apply Changes
- Click Apply button
- Your widget is now installed!
Step 5: Publish Your Site
- Click the Publish button in the top right corner of your editor
- Wait for your site to publish
- Visit your live site to see the widget in action
Method 2: Using Embed Code Element
This method lets you add the widget to specific pages or sections.
Step 1: Open the Wix Editor
- Go to your Wix Dashboard
- Click Edit Site to open the editor
Step 2: Add Embed Code Element
- Click the Add Elements button (+) on the left sidebar
- Click Embed Code
- Select Embed HTML
- Drag the embed element to where you want it on your page (you can position it anywhere, but bottom of page is recommended)
Step 3: Add Your Widget Code
- Click Enter Code in the embed element
- Paste your widget script:
<script src="https://your-domain.com/widget.js"></script>
<script>
YourWidget.init({
apiKey: 'YOUR_API_KEY'
});
</script>
- Replace
YOUR_API_KEYwith your actual API key - Click Update
Step 4: Configure Settings
- Click Settings on the embed element
- Under "What does this code do?":
- Select Other
- Click Apply
Step 5: Publish Your Changes
- Click Publish in the top right
- Your widget will now appear on that page
Note: You'll need to repeat this process for each page where you want the widget to appear.
Method 3: Using Tracking & Analytics
This method is ideal for site-wide installation and works with all Premium plans.
Step 1: Access Tracking Tools
- Go to your Site Dashboard
- Click Settings in the left sidebar
- Scroll to Advanced section
- Click Tracking & Analytics
Step 2: Add New Tool
- Click + New Tool button
- Select Custom from the list
Step 3: Add Your Code
Give your tool a name (e.g., "My Widget")
Paste your widget script in the Paste the code snippet here box:
<script src="https://your-domain.com/widget.js"></script>
<script>
YourWidget.init({
apiKey: 'YOUR_API_KEY'
});
</script>
Replace
YOUR_API_KEYwith your actual API keyUnder Add Code to Pages: Select All pages (or choose specific pages)
Under Place Code in: Select Body - end
Click Apply
Installing on Specific Pages Only
Using Custom Code for Specific Pages
When adding custom code (Method 1):
- In step 3, under Add code to pages, select Choose specific pages
- Check the boxes next to the pages where you want the widget
- Click Apply
Page Selection Options
You can choose to add the widget to:
- All pages
- Homepage only
- Specific pages (select from list)
- All pages except specific pages
Wix ADI (Artificial Design Intelligence) Sites
If you created your site with Wix ADI:
- You'll need to switch to the Wix Editor to add custom code
- Go to your Dashboard
- Click Edit Site
- Select Switch to the Wix Editor
- Once switched, follow Method 1 or Method 2 above
Note: Switching from ADI to the Editor is permanent and cannot be undone.
Wix Editor X / Wix Studio
For Wix Editor X or Wix Studio users:
Using Page Code
- Open your site in Editor X/Studio
- Click on the page menu (looks like stacked papers) on the left sidebar
- Hover over the page you want to edit
- Click the three dots (...)
- Select Page Code
- Paste your widget script in the Body - End section
- Click Apply
Troubleshooting
Widget Not Appearing
Verify you have a Premium plan:
- Custom code features require a Wix Premium plan
- Free Wix sites cannot add custom code
- Upgrade at wix.com if needed
Check code placement:
- Make sure you selected "Body - end" as the placement
- Verify the code is set to load on the correct pages
Clear cache and refresh:
- Clear your browser cache
- Use Ctrl+Shift+R (Windows) or Cmd+Shift+R (Mac) to hard refresh
- Try viewing in an incognito/private browser window
Republish your site:
- Go to the Wix Editor
- Click Publish again
- Wait a few minutes for changes to propagate
Verify API key:
- Make sure you've replaced
YOUR_API_KEYwith your actual key - Check for extra spaces or estimates
- Verify the key is correct in your dashboard
- Make sure you've replaced
Widget Appears Multiple Times
- You may have added the widget in multiple places
- Check Custom Code, Tracking & Analytics, and Embed elements
- Remove duplicate installations
Widget Only Works on Some Pages
- Review your page selection settings in Custom Code
- Make sure "All Pages" is selected, or verify specific pages are checked
- Check if you have different settings in Tracking & Analytics
Error Messages
If you see "Invalid Code" or similar errors:
- Check that you've copied the entire script
- Make sure there are no missing
<or>characters - Verify estimates are straight estimates (") not curly estimates ("")
- Try removing and re-adding the code
Important Notes
⚠️ Premium Plan Required:
- Custom code features require a Wix Premium plan
- Free Wix sites do not support custom code
- Upgrade your plan to use this feature
⚠️ Preview vs. Published:
- Custom code may not work in Preview mode
- Always test on your published live site
⚠️ Mobile Responsiveness:
- The widget will automatically adapt to mobile devices
- Test on both desktop and mobile after installation
Best Practices
- Use Method 1 (Custom Code) for site-wide installation
- Test before going live - preview your changes
- Keep your API key secure - don't share it publicly
- Document your installation - note which method you used
- Check after major Wix updates - custom code usually persists but verify
Wix Plan Comparison
| Feature | Free Plan | Premium Plans |
|---|---|---|
| Custom Code | ❌ No | ✅ Yes |
| Tracking & Analytics | ❌ No | ✅ Yes |
| Embed HTML | ✅ Yes | ✅ Yes |
Note: Embed HTML on free plans is limited and may not work for all widgets.
Need Help?
If you encounter any issues:
- Check our FAQ at [your-support-url]
- Contact support at [your-support-email]
- Mention that you're using Wix and include your plan type
- Take screenshots of any error messages
Removing the Widget
To remove the widget from your Wix site:
If using Custom Code:
- Go to Settings → Custom Code
- Find your widget code
- Click the three dots (...)
- Select Delete
- Confirm deletion
- Republish your site
If using Embed Element:
- Open the Wix Editor
- Click on the embed element containing the widget
- Press Delete on your keyboard
- Publish your site
If using Tracking & Analytics:
- Go to Settings → Tracking & Analytics
- Find your widget tool
- Click Delete
- Confirm deletion