Friendly, All-Access Guide to Installing the Funneler AI Script
This expanded guide covers all major CMS options and plain websites. The core goal is the same: insert the following tag just before the closing </body> on your pages.
In your Funneler dashboard, go to Chat Funnels, click the activation code button, and copy the unique account code found within the <script>…your account code…</script> snippet. You may save this code locally for future reference.
Now choose your platform from the list below to get started.
Table of Contents
- 1) WordPress
- 2) Elementor
- 3) Beaver Builder
- 4) Divi
- 5) Other WordPress page builders
- 6) Child Theme or Site-wide Plugin (safe, maintainable approach)
- 7) Plugins for “Insert Headers and Footers” style insertions
- 8) WordPress Multisite considerations
- 9) Wix
- 10) Webflow
- 11) Squarespace
- 12) Joomla
- 13) Drupal
- 14) Magento / Adobe Commerce
- 15) Weebly
- 16) Shopify
- 17) Plain non-CMS / hand-coded websites
1) WordPress
Quick recap
- You’re inserting a small JavaScript tag just before the closing
</body>tag. - The code snippet: <script>…your account code…</script>
Best-practice overview
- Use a maintenance-friendly path (child theme or site-wide plugin) to survive updates.
- Clear caches after insertion; test in incognito to verify loading.
Path options
Path A: Page-builder friendly approach (Elementor, Beaver Builder, Divi, etc.)
- Elementor (and similar editors)
- Beaver Builder
- Divi
- Other builders (Thrive, Brizy, Oxygen, etc.)
Path B: Safe, maintainable approach
- Child Theme (recommended)
- Lightweight plugin (Code Snippets / WPCode)
- Functions.php enqueue (advanced)
Path C: Plugins for “Insert Headers and Footers” style insertion
- Insert Headers and Footers
- WPCode (Snippets)
- Code Snippets
Testing & troubleshooting
- View Source to confirm tag before
</body>. - Incognito testing; check console for errors.
2) Elementor
Approach
- Use a site-wide footer insertion via a snippet plugin (recommended) OR
- Place a snippet in Elementor’s Theme Builder footer (if you have Elementor Pro).
Steps (recommended site-wide method)
- Install and activate a snippet plugin (e.g., WPCode or Insert Headers and Footers).
- Create a new snippet.
- Location: Before
</body>(Footer). - Content: html
<script>...your account code...</script> - Save and set to All Pages.
- Clear caches and test.
Alternative (page-level)
- Edit a page with Elementor.
- Add an HTML widget near the bottom and paste the script tag.
- Note: To cover all pages, you’d need to repeat or use the site-wide method.
3) Beaver Builder
Approach
- Prefer a global footer or code injection method.
- If your theme supports it, add to footer.php in a child theme; otherwise, use a snippet plugin.
Steps (global code injection)
- Install a snippet plugin.
- Create a new snippet with location: Before
</body>. - Content: the script tag.
- Save, enable on all pages, clear caches, test.
4) Divi
Approach
- Divi has integration areas for code snippets.
Steps
- Divi > Theme Options > Integration.
- In “Before </body>” (or similar) paste the code.
- Save changes and test across pages.
5) Other WordPress page builders
- Oxygen Builder, Thrive Architect, Brizy, etc.
- General guidance: use a global code insertion path via a snippet plugin or theme integration area when available.
- If no global option exists, resort to editing footer.php in a child theme with caution.
6) Child Theme or Site-wide Plugin (safe, maintainable approach)
1) Child Theme (recommended)
- Create/edit footer.php in your child theme.
- Insert the snippet just before
</body>.
Example:
?php// Footer content...?>
<script>...your account code...</script>
</body>
</html>
- Why child themes? Updates to the parent theme won’t overwrite your changes.
2) Lightweight Plugin (Code Snippets / WPCode)
- Create a snippet: Location = Before
</body>; Content = script tag.
3) Site-wide functions.php alternative (advanced)
<?php
// Footer content...
?>
<script>...your account code...</script></body>
</html>
7) Plugins for “Insert Headers and Footers” style insertions
Common steps
- Install and activate the plugin.
- Create a new snippet:
- Type: HTML or Script
- Location: Before
</body>(Footer) - Content: the script tag
- Apply to All Pages; clear caches; test.
8) WordPress Multisite considerations
- Use a network-wide code injection (via a site admin plugin) if you want the script on all subsites.
- Alternatively, add to the shared footer template or use a central child theme that propagates to all sites.
9) Wix
- Wix Editor: Settings > Tracking & Analytics or Custom Code.
- Add a new tool, place code in Footer, paste snippet <script>…your account code…</script>, apply to all pages, publish.
- Confirm with Page Source in a live view.
10) Webflow
- Project Settings > Custom Code > Footer Code.
- Paste the snippet <script>…your account code…</script> ,save and publish.
- Code runs site-wide on all pages.
11) Squarespace
- Settings > Advanced > Code Injection > Footer.
- Paste snippet <script>…your account code…</script>; save and publish.
- Code runs site-wide on all pages.
12) Joomla
Approach
- Use a site-wide template override or a simple extension that injects code before
</body>.
Steps
- Identify the template’s footer file (e.g., index.php in your template).
- Insert the snippet <script>…your account code…</script> just before the closing
</body>. - Clear caches and verify.
13) Drupal
Approach
- Use a site-wide HTML head/footer injection module or add a small custom module.
Steps
- Install a module like “Block” or “Footer Scripts” (depending on Drupal version).
- Add a block that outputs: html
<script>...your account code...</script> - Place block in the footer region; test across pages.
14) Magento / Adobe Commerce
Approach
- Use the layout XML to add a script to the footer, or use a module that supports custom JS.
Steps
- Create/modify layout update to include:
xml<referenceContainer name="before.body.end"> <block class="Magento\Framework\View\Element\Text" name="funneler_ai_script"> <arguments> <argument name="text" xsi:type="string"><![CDATA[<script>...your account code...</script>]></argument> </arguments> </block> </referenceContainer>
2. Deploy and test.
15) Weebly
Approach
- Use the site-wide Settings > SEO > Header Code or Footer Code (depending on version).
- Paste snippet in Footer; save and publish.
16) Shopify
Shopify is a bit different because it uses theme-level liquid templates rather than inserting raw HTML into every page. Here are practical, safe options to include your script site-wide:
Pink note on Shopify architecture
- Shopify themes render pages via Liquid templates. To add a script site-wide, you typically insert it into the theme’s theme.liquid file, just before the closing </body> tag. If you’re using Shopify Online Store 2.0, you can also use an app or theme sections to manage code snippets, but the common approach remains editing theme.liquid.
Approaches
Approach A: Theme editing (site-wide)
- From Shopify Admin, go to Online Store > Themes > Actions > Edit code.
- Open layout/theme.liquid (or layout/theme.liquid in some themes).
- Just before </body>, insert:
html<script>...your account code...</script>
- Save changes and test on storefront.
Approach B: Theme app extension or Shopify app (per-page or app-managed)
- If you’re using a code injection app or a Shopify App that manages snippets, use its UI to inject your snippet before </body> on all pages or on specific templates.
- Ensure the app is configured to load on all pages and that the snippet is exactly:
html<script>...your account code...</script>
Testing
- Open a storefront page, View Page Source to confirm the script tag appears before the closing tag.
- Check on mobile and desktop, and verify it loads without blocking content.
17) Plain non-CMS / hand-coded websites
Steps
- Open your HTML files (index.html, page.html, etc.).
- Before the closing
</body>, insert: html<script>...your account code...</script> - Save and upload; clear caches; test.
Tips
- Maintain a single source of truth by centralizing the code in a common footer include if you serve many pages via server-side templates.
Testing & Troubleshooting
- Verify the tag is present just before
</body>via View Source. - Test in an incognito window to bypass cache.
- Check the browser console for errors (e.g., mixed content, CSP blocks, or syntax errors).
- If the script doesn’t load:
- Confirm the URL is correct and accessible (HTTPS).
- Ensure no conflicting script blocks use the same globals.
- Consider deferring or asynchronously loading the script if needed, though the current instruction requests before
</body>.
Quick reference checklist
- Identify the platform and method you’ll use (WordPress + plugin, child theme, or page builder)
- Prepare the exact snippet to insert
- Insert the snippet <script>…your account code…</script> just before
</body> - Clear caches (site, plugin, browser)
- Verify with View Source and incognito testing
- Document where you kept the change (for future updates)
Advanced Installation Options
Install on Specific Pages Only
Modify the code to show widget only on certain pages:
<script>
// Only load on homepage
if (window.location.pathname === '/') {
var script = document.createElement('script');
script.src = 'https://app.funneler.ai/chat-widget.js';
script.setAttribute('data-funnel-id', 'YOUR_FUNNEL_ID');
document.head.appendChild(script);
}
</script>
Delay Widget Load
Wait for page to fully load first:
<script>
window.addEventListener('load', function() {
var script = document.createElement('script');
script.src = 'https://app.funneler.ai/chat-widget.js';
script.setAttribute('data-funnel-id', 'YOUR_FUNNEL_ID');
document.head.appendChild(script);
});
</script>
Custom Positioning
Override default position with CSS:
<style>
#funneler-chat-widget {
bottom: 80px !important; /* Move up from bottom */
right: 30px !important; /* Adjust from right */
}
</style>
Google Tag Manager Installation
Using GTM? Follow these steps:
- Create New Tag:
- Go to GTM dashboard
- Click “Tags” > “New”
- Name it “Funneler Widget”
- Configure Tag:
- Tag Type: Custom HTML
- Paste your activation code
- Set Trigger:
- Trigger: All Pages (or specific pages)
- Or use Page View trigger
- Save and Publish:
- Click “Save”
- Click “Submit”
- Publish changes
Verifying Installation
Check if widget is working:
- Visit Your Website:
- Open your site in a browser
- Look for chat widget in corner
- Try different pages
- Test the Widget:
- Click to open chat
- Send a test message
- Verify AI responds
- Check Browser Console:
- Press F12 to open developer tools
- Look for errors in Console tab
- Funneler should load without errors
- Verify in Funneler Dashboard:
- Go to your funnel analytics
- Check if conversations appear
- May take a few minutes to sync
Troubleshooting Installation
Problem: Widget doesn’t appear
Solutions:
- ✅ Check code is pasted correctly
- ✅ Verify it’s in the
<body>section, before</body> - ✅ Clear browser cache and refresh
- ✅ Check browser console for errors
- ✅ Ensure funnel is published and active
- ✅ Try incognito/private browsing mode
Problem: Widget shows but doesn’t work
Solutions:
- ✅ Verify funnel ID is correct
- ✅ Check if funnel is active in dashboard
- ✅ Look for JavaScript errors in console
- ✅ Disable browser ad blockers
- ✅ Check if other scripts conflict
Problem: Widget appears on wrong pages
Solutions:
- ✅ Use conditional code (see Advanced Options above)
- ✅ Install in page-specific templates
- ✅ Use GTM with page-specific triggers
Problem: Widget position is wrong
Solutions:
- ✅ Use custom CSS to adjust position
- ✅ Check for CSS conflicts
- ✅ Use browser DevTools to debug positioning
Problem: Multiple widgets appear
Solutions:
- ✅ Code may be pasted multiple times
- ✅ Check theme template and plugin both have code
- ✅ Remove duplicate installations
Performance Best Practices
Optimize Load Times:
- Load Asynchronously: Our code already does this
- Place in Footer: Loads after main content
- Use CDN: We serve from global CDN (automatic)
- Lazy Load on Scroll: Advanced option available
Mobile Optimization:
- Widget is automatically responsive
- Touch-friendly on mobile devices
- Adjusts size for small screens
- Can hide on mobile if needed:
<style>
@media (max-width: 768px) {
#funneler-chat-widget {
display: none !important;
}
}
</style>
Removing the Widget
To remove Funneler widget:
- Locate where you pasted the code
- Delete the entire
<script>block - Save changes
- Clear cache
- Refresh your site
Note: Removing the widget doesn’t delete your funnel or data. You can reinstall anytime.