Weebly
Install the widget on your Weebly website
Installing the Widget on Weebly
Overview
This guide will walk you through installing our JavaScript widget on your Weebly website. Weebly offers simple methods to add custom code to your site.
Method 1: Using Embed Code Element (Recommended)
This is the easiest method for adding the widget to your Weebly site.
Step 1: Access the Weebly Editor
- Log in to your Weebly account
- Click Edit Site on the website you want to modify
- The Weebly drag-and-drop editor will open
Step 2: Add Embed Code Element
- In the left sidebar, find the Basic or More section
- Look for the Embed Code element
- Drag and drop the Embed Code element onto your page
- Place it at the bottom of your page (recommended) or wherever you prefer
Step 3: Add Your Widget Script
- Click on the Embed Code element you just added
- A popup window will appear with a text box
- Click Edit Custom HTML
- 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 from your dashboard - Click Update or outside the popup to close
Step 4: Add to Other Pages
If you want the widget on multiple pages:
- Copy the Embed Code element (Ctrl+C or Cmd+C)
- Navigate to another page
- Paste the element (Ctrl+V or Cmd+V)
- Repeat for all desired pages
Step 5: Publish Your Site
- Click Publish in the top right corner
- Your widget is now live on your website!
Method 2: Using Footer Code (Site-Wide)
This method adds the widget to all pages at once.
Step 1: Access Settings
- In the Weebly editor, click Settings in the top menu
- Select SEO from the left sidebar
- Scroll down to the Footer Code section
Step 2: Add Your Widget Script
- Click in the Footer Code text box
- 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
Step 3: Save and Publish
- Click Save at the bottom of the settings
- Exit settings by clicking the X or back arrow
- Click Publish in the top right corner
- Your widget will now appear on all pages of your site
Method 3: Using Header Code (Alternative)
Similar to Method 2, but adds code to the header section.
Step 1: Access Header Code
- Click Settings in the top menu
- Select SEO from the left sidebar
- Scroll to the Header Code section
Step 2: Add Your Script
- Paste your widget script in the Header Code 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 key
Step 3: Save and Publish
- Click Save
- Click Publish
Note: Footer Code (Method 2) is generally preferred for better page load performance.
Installing on Specific Pages Only
Using Embed Code Element
Follow Method 1 and only add the Embed Code element to the pages where you want the widget.
Using Page-Specific Settings
Weebly doesn't have built-in page-specific code injection, so use Method 1 (Embed Code) for page-specific installation.
Weebly E-Commerce Sites
For Weebly stores:
On All Pages
Use Method 2 (Footer Code) to add the widget site-wide.
On Product Pages Only
- Edit a product page
- Use Method 1 (Embed Code element) to add the widget
- The widget will only appear on that specific product page
- Repeat for other product pages as needed
On Checkout Page
Unfortunately, Weebly doesn't allow custom code on checkout pages for security reasons. The widget will work on all other pages using Method 2.
Weebly App Center
Check for Native Integration
- Go to Apps in the Weebly editor
- Search for our widget name
- If available, click Add for easy one-click installation
Note: If our widget isn't in the Weebly App Center yet, use the manual installation methods above.
Troubleshooting
Widget Not Appearing
Publish your site:
- Make sure you clicked Publish after adding the code
- Changes don't appear until you publish
Clear cache:
- Clear your browser cache
- Use Ctrl+Shift+R (Windows) or Cmd+Shift+R (Mac)
- Try viewing in an incognito/private browser window
Check element placement:
- Make sure the Embed Code element is visible (not hidden)
- Try moving it to a different location on the page
Verify API key:
- Ensure you replaced
YOUR_API_KEYwith your actual key - Check for extra spaces or estimates
- Confirm the key is correct in your dashboard
- Ensure you replaced
Widget Appears Multiple Times
- You may have added the code in multiple locations:
- Both Footer Code (site-wide) AND Embed Code elements
- Multiple Embed Code elements
- Remove duplicate installations
Embed Code Element Shows Raw Code
- Make sure you're using the Embed Code element, not a Text element
- The code should be invisible on your page
- If you see the actual code text, you're using the wrong element type
Widget Not Working After Theme Change
- Custom code should persist after theme changes
- If widget disappears, re-add it following the methods above
- Check that the Embed Code elements weren't removed
Best Practices
- Use Method 2 (Footer Code) for site-wide installation - it's the most efficient
- Use Method 1 (Embed Code) for page-specific installation
- Always publish after changes to see them on your live site
- Test on mobile - Weebly is mobile-responsive, but always verify
- Keep your API key secure - don't share it publicly
Weebly Plan Comparison
| Feature | Free Plan | Starter/Pro/Business |
|---|---|---|
| Embed Code Element | ✅ Yes | ✅ Yes |
| Header/Footer Code | ⚠️ Limited | ✅ Full Access |
| Custom Domain | ❌ No | ✅ Yes |
Note: Free plans may have limited access to SEO settings and custom code features.
Important Notes
⚠️ Weebly Editor Versions:
- Weebly has updated their editor over time
- If your interface looks different, look for similar menu items
- The core functionality remains the same
⚠️ Code Limitations:
- Some advanced JavaScript features may have restrictions
- Weebly's platform has security measures that may limit certain code
- Our widget is designed to work within these limitations
⚠️ Mobile Responsiveness:
- The widget should automatically work on mobile devices
- Always test on both desktop and mobile after installation
Weebly vs Square Online
If you're using Square Online (formerly Weebly):
The same methods apply:
- Embed Code Element - Works the same way
- Footer Code - Found in Settings → SEO
- Header Code - Also in Settings → SEO
Square Online uses the same platform as Weebly, so all instructions above are applicable.
Advanced Tips
Checking if Code is Working
- Right-click on your published site
- Select View Page Source or Inspect
- Press Ctrl+F (Cmd+F on Mac) to search
- Search for "YourWidget" or your widget name
- If found, the code is installed correctly
Positioning the Embed Code Element
- Bottom of page: Best for widgets that appear as overlays or pop-ups
- Specific section: If your widget needs to appear in a certain location
- Footer area: Use the Weebly footer section for consistent placement
Compatibility
The widget is compatible with:
- All Weebly themes (standard and premium)
- Weebly drag-and-drop editor
- Weebly e-commerce features
- Square Online stores
- Mobile and desktop views
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 Weebly or Square Online
- Include your plan type (Free, Starter, Pro, or Business)
- Take screenshots of any error messages
Removing the Widget
To remove the widget from your Weebly site:
If using Embed Code Element:
- Open your site in the Weebly editor
- Click on the Embed Code element
- Press Delete on your keyboard, or
- Click the trash can icon that appears
- Repeat for all pages where you added it
- Click Publish
If using Footer Code:
- Go to Settings → SEO
- Scroll to Footer Code
- Delete the widget script
- Click Save
- Click Publish
If using Header Code:
- Go to Settings → SEO
- Scroll to Header Code
- Delete the widget script
- Click Save
- Click Publish
Quick Reference
Fastest Installation: Method 2 (Footer Code) for site-wide Most Flexible: Method 1 (Embed Code) for specific pages Best Performance: Method 2 (Footer Code)
Remember to always Publish your site after making changes!