How to Add an AI Chatbot to Framer: Custom Code in 7 Steps (and the One Setting to Get Right)
Add an AI chatbot to Framer: Project Settings → Custom Code → Add Script, at the end of body. Why 'Once' beats 'every page visit' for chat widgets.
By Jahidul Hossain Mekat11 min read
On this page
To add an AI chatbot to Framer, open Project Settings, select the Custom Code tab, click Add Script, paste the chatbot’s script, place it at the end of the page body, leave every page selected, set it to run Once, save and publish. The chat appears on the published site, not on the canvas. Check that your Framer plan allows custom code before you start; the free plan is meant for non-commercial sites.
What you need before you start
- Edit access to the Framer project, with permission to change Project Settings and publish.
- A plan that allows custom code. Framer’s pricing page lists Free ($0), Basic ($10 a month) and Pro ($30 a month), and describes Free as “ideal for non-commercial use” (Framer pricing, read 25 Nov 2026). Framer’s custom code help article doesn’t name a plan, but most install guides from chat and analytics vendors say the Custom Code section needs a paid site plan. If the tab is locked, that’s why.
- Your chatbot’s script. One line starting with
<script. In Site Can Talk, paste your website address to sign up; the Add it to your website panel has a Copy code button. It looks like this:<script async src="https://…/w.js" data-site="your-site-id"></script> - Real text on your pages. Framer sites often put headline copy into images, video and animated components. A chatbot that reads your site can only quote text that exists in the page’s HTML.
How to add an AI chatbot to Framer: 7 steps
These steps follow Framer’s own help article on custom code (Framer Help, updated 19 Nov 2026):
- Open Project Settings from the top of the Framer editor.
- Select the Custom Code tab in the left sidebar.
- Click Add Script (or the + icon if you’ve added code before).
- Name it something you’ll recognise later, such as “Site Can Talk chat”.
- Choose the placement: the end of the body. A chat widget belongs after your content, so it loads without holding up the page. Paste the script.
- Leave all pages selected so the chat follows visitors around the site, and set it to run Once (more on this below). Save.
- Publish, then test the live site in a private window on a phone and a computer. Click between a few pages and check there’s exactly one chat button.
In Site Can Talk, add each address the site is published on under Settings → Websites allowed to use it: your custom domain and your free Framer subdomain if you test there. The assistant only runs on listed sites, so a copy of your code elsewhere can’t use your allowance.
“Once” or “Run on every page visit”: which to choose?
Framer asks how often the code should run: Once or Run on every page visit (Framer Help). The choice matters for chat widgets, because Framer sites switch pages without a full reload.
| Setting | What happens | Good for |
|---|---|---|
| Once | The script runs when the site first loads, and the widget stays as visitors move between pages | Chat widgets, so an open conversation isn’t interrupted |
| Run on every page visit | The script runs again each time a visitor goes to another page | Scripts that need to react to each page, such as some page-view trackers |
Choose Once for a chatbot. If you choose every page visit, a widget that isn’t built for it may load a second copy after the first page change, giving you two buttons, or restart the chat each time. If the button disappears after navigating with Once selected, the widget may need a page-level setup; ask its vendor.
Why doesn’t the chatbot show on the Framer canvas?
Framer doesn’t run custom code on the canvas or in the editor preview. That protects the editor from scripts that could interfere with it. Always test on the published site. If it’s not there either, open the browser’s developer console (F12) on the live page and look for errors mentioning the script.
Framer also offers code components for developers (Framer developers), but a chat widget that floats over every page doesn’t need one. A script at the end of the body is simpler and survives redesigns.
A 3-step check when it doesn’t appear
- Open the live page, right-click and choose View page source. Search for the script’s address. If it isn’t there, the code wasn’t saved or the site wasn’t republished.
- If it’s in the source, open the console (F12) and reload. A red error naming the script usually means a typo in the pasted line or a blocked domain.
- If there’s no error and still no button, check the chatbot’s own settings: the site address must be on its allowed list, and its page rules must include the page you’re on.
Framer chatbot plugin, component or script: which to use?
People search for a “Framer chatbot plugin” or “component” expecting an add-on inside the editor. There are three ways a chatbot can get onto a Framer site:
| Method | How it works | Best for |
|---|---|---|
| Custom Code script (this guide) | One script in Project Settings loads the widget on every page | Any chatbot with an embed script; site-wide chat |
| Marketplace plugin or component | A vendor’s component you place on the canvas | Chat shown inline in a section; vendor-specific |
| Embed component on one page | Paste code into an embed on a single page | Testing on one page; inline embeds like booking calendars |
For a floating chat button that follows visitors, the script route works with any vendor and doesn’t depend on a plugin being maintained.
What should a chatbot on a Framer site answer?
Framer sites are mostly startups, agencies, freelancers and product launches. Their visitors are deciding whether to sign up, book a call or buy, and they ask the same handful of questions:
| Visitor asks | Page that answers it | Never let the chatbot |
|---|---|---|
| “How much is it?” | Pricing page in text, not just a screenshot | Quote a price or discount you haven’t published |
| “Does it do X / work with Y?” | Features and integrations pages | Say yes to anything not listed |
| “Is there a free trial?” | Pricing or FAQ | Invent trial terms |
| “Who’s behind this?” | About page with names | Make up team members or customers |
| “Can I talk to someone?” | Contact or booking page | Confirm a meeting it can’t see |
Whatever the chatbot says, your business owns it. In Moffatt v. Air Canada, a tribunal held the airline to its chatbot’s wrong answer, saying it makes no difference whether information “comes from a static page or a chatbot” (2024 BCCRT 149). Choose a tool that answers only from your pages and says when it doesn’t know. Our hallucination test takes 15 minutes.
Will a chatbot clash with my Framer design?
Framer sites are usually design-led, so the widget has to fit. Check four things:
- Colour and position. Pick the button colour from your palette and a corner that doesn’t cover your own sticky buttons or cookie banner.
- Style isolation. Some widgets inject global CSS that can override your fonts. Site Can Talk runs inside a closed Shadow DOM, so neither your Framer styles nor the chat’s can leak into the other.
- Weight. The script should be
asyncand small; ours is under 30 KB compressed, and the voice code only loads when someone starts a call. - Mobile. Open the site at phone width and make sure the chat doesn’t cover your main call-to-action.
Site Can Talk also lets your own Framer buttons open the chat: add a link or button with the attribute data-wct-open, or data-wct-ask="How much is it?" to ask a question straight away. That fits a design-led site better than a floating button alone.
How to show the chatbot only on some pages
Framer’s Custom Code lets you pick pages, but because the widget should run Once, page choices only apply to the page a visitor lands on first; after that the widget stays as they move around. The same is true of a chatbot’s own page rules, which are checked when the site first loads. In Site Can Talk those rules live under Settings → Where it shows (Every page, Only these pages or Every page except these, with * as a wildcard).
In practice, on a Framer site the simplest choice is usually best: show the chat everywhere, and use your own buttons with data-wct-open on the pages where you want to invite questions most.
Framer Localization and multilingual visitors
If you use Framer’s localization, each language version lives on its own path. You have two sensible setups:
| Setup | How it works | Trade-off |
|---|---|---|
| One source language | The assistant reads your main-language pages and replies in each visitor’s language | One set of facts to keep current; test key answers per language |
| Every localized page | The assistant reads all language versions | Uses more of the page allowance; translations can drift out of step |
Most small sites do better with the first. Whichever you choose, make sure prices and plan names are identical in every language; a price updated in one language and not another is an easy mistake to miss.
Use the chat to learn what visitors want
For a startup or a new product, the questions visitors type are research you didn’t have to pay for. Read them every week for the first month and sort them into three piles:
- Answered well: your site already explains this. Consider moving it higher on the page.
- Not answered: missing information. Add a line to the pricing, features or FAQ page.
- Asked for something you don’t do: possible product demand. Count it, and note the wording people use.
The second pile improves your conversion rate; the third can shape your roadmap. Both are things a contact form never tells you, because visitors rarely fill in a form just to ask a small question.
For freelancers building Framer sites for clients
- Set up the assistant under the client’s account or move it to them at handover, so enquiries reach the client, not you.
- Agree the rules in writing: which prices to quote, what not to promise, and where to send people who want a person.
- Add the script last, after the copy is final, then have the assistant re-read the site so it doesn’t quote placeholder text.
- Include it in your test checklist alongside forms and links, using the 8 questions below.
Running several client sites? Site Can Talk’s Agency plan covers 10 sites for $199 a month, each configured separately.
What does a chatbot cost on top of Framer?
Add the two bills together before you decide:
| Item | Price | Notes |
|---|---|---|
| Framer site plan | Basic $10 or Pro $30 a month | Framer pricing page, read 25 Nov 2026 |
| Site Can Talk | Free (200 messages, 10 voice minutes) or Starter $19 | Paid plans include 2,000 messages and 60+ voice minutes |
| Other AI chatbots | Free to about $59 a month for entry plans | See our pricing comparison of 15 tools |
For a new site, start on a free chatbot plan and watch how many questions arrive in the first month before paying for more. The questions themselves tell you whether visitors want to talk at all.
Chatbot not working on Framer? Fixes
| Symptom | Likely cause | Fix |
|---|---|---|
| Custom Code tab locked | Plan doesn’t include custom code | Upgrade the site plan |
| Not on the canvas | Custom code never runs in the editor | Publish and test the live site |
| Not on the live site | Saved but not published, or the script was placed in the head with an error | Publish; check the placement is the end of the body |
| Two chat buttons after changing page | Set to run on every page visit | Change it to Once |
| Only on some pages | Specific pages were selected | Clear the page selection so it runs everywhere |
| Button shows but doesn’t answer | The domain isn’t on the chatbot’s allowed list | Add the custom domain and the Framer subdomain |
| Doesn’t know your pricing | Prices are in an image or a component with no text | Put prices in real text, then re-read the site |
Test it with 8 questions before launch
- Your price for the main plan (quoted exactly from the pricing page).
- A price that isn’t published (should say so and offer contact).
- A feature you have (from the features page).
- A feature you don’t have (should say it isn’t listed).
- “Is there a free trial?” (only what the page says).
- “Book a demo for Friday” (should send to your booking page).
- The same pricing question in another language.
- “Email me more details” (you should receive the enquiry).
Site Can Talk answers only from your Framer pages and the details you add, shows visitors the right page, and emails you each enquiry. The free plan covers 200 chat messages and 10 voice minutes a month; see pricing. On another platform? See our guides for Webflow, Shopify, WordPress, Wix and Squarespace.
Questions
How do I add a chatbot to Framer?
Open Project Settings, select the Custom Code tab, click Add Script, paste the chatbot's script, place it at the end of the body, leave all pages selected, set it to run Once, save and publish. Test on the live site.
Do I need a paid Framer plan for a chatbot?
Most likely. Framer describes its free plan as ideal for non-commercial use, and chat and analytics vendors' install guides say Framer's Custom Code needs a paid site plan. If the Custom Code tab is locked, upgrade the site plan.
Should a Framer chatbot script run Once or on every page visit?
Once. Framer changes pages without a full reload, so a script set to run on every page visit can load a second copy of a chat widget or restart the conversation.
Why doesn't my chatbot show in the Framer editor?
Framer doesn't run custom code on the canvas or in the editor preview. Publish the site and check the live URL.
Will a chatbot slow down my Framer site?
Not if the script loads asynchronously at the end of the body and stays small. Site Can Talk's main script is under 30 KB compressed and loads its voice code only when a visitor starts a call. Compare PageSpeed Insights scores before and after.
Can my own Framer buttons open the chat?
With Site Can Talk, yes: give a button or link the attribute data-wct-open to open the chat, or data-wct-ask with a question to ask it straight away.
Why are there two chat buttons on my Framer site?
Usually because the script is set to run on every page visit, so it loads again after each page change, or because it was added twice (in Custom Code and in an embed). Keep one copy and set it to run Once.
Is there a Framer chatbot plugin?
Some vendors offer components for the canvas, but any chatbot with an embed script works through Project Settings, Custom Code. That route shows a floating chat on every page and doesn't depend on a plugin being maintained.
About the author
Jahidul is the founder of Site Can Talk, the AI chat and voice agent that answers a business's website visitors from its own pages and sends every lead to the owner.
Jahidul Hossain Mekat on LinkedInSources
- Framer Help Center, updated 19 Nov 2026How to add custom code
- Framer, read 25 Nov 2026Pricing
- Framer Developers, read 25 Nov 2026Custom code
- Civil Resolution Tribunal of British Columbia, 14 Feb 2024Moffatt v. Air Canada, 2024 BCCRT 149