How to add an AI chatbot to a Framer website
Paste the chatbot script in Framer's Settings → Code at End of <body> and publish. Tested on a free site: the badge clash, phone layout and preview.
To add an AI chatbot to a Framer website:
- Open Settings → Code and click Add script.
- Paste the chatbot's script tags into Code.
- Leave Placement on End of
<body>, Page on All and Run on Once, then click Add. - Click Publish. The widget runs on the published site only, not in Framer's preview.
It worked on a free Framer plan when we tested it on 30 November 2026. The install took two minutes; the trouble showed up on the live site. Framer's free "Made in Framer" badge sat on top of the chat launcher, and on a phone a site with only a Desktop layout shrank the chat to a speck. The fix for each is further down.
We make Laddu Chat, so the snippet and the screenshots are ours. The Framer steps (where the script goes, publishing, the badge and the Phone breakpoint) apply to any chat widget that installs with a script tag. If you build Framer sites for clients, the badge and phone sections are the two to check before handover. If your site isn't on Framer, use the guide for Webflow, WordPress or plain HTML instead.
What did we test, and on which Framer plan?#
We signed up for a new Framer account on the free plan with an email sign-in link, with no card and no trial. The editor opened a blank project. We added two lines of text ("Harbour Street Bakery" and its opening hours) so the page wasn't empty, and published it to the free address Framer gave us, <project-name>.framer.app.
For the bot we used Laddu's own site bot, the one on chat.laddu-ai.com. That's why it introduces itself as Laddu's assistant in the screenshots.
We checked the published site in Chromium at 1280 pixels wide and at 390 pixels, an iPhone-sized screen, from a browser that wasn't logged in to Framer.
Step 1: Where do you get the chatbot snippet?#
Train the bot before you open Framer. You'll test the live widget with real questions, and a bot with no sources guesses (how website AI chatbots work explains why). No account yet? Create one free (details in the cost section below).
- Add your key pages as sources, one URL each: home, services or menu, prices, contact, FAQ. Add PDFs your customers ask about and paste text for anything that isn't written down anywhere.
- Open the bot, go to Settings → Embed Scripts, check that Enable embedding on website is on, and click Copy Script.
You get two tags:
<script>window.ladduConfig = { chatbotId: "<your-bot-id>" };</script>
<script src="https://chat.laddu-ai.com/embed.js" defer></script>
The first line tells the loader which bot to show. The second loads the widget. Keep them together and in this order.
Step 2: Where do you paste the script in Framer?#
In the Framer editor:
- Open the menu at the top left and choose Settings.
- Under Site, click Code. (Framer's help centre calls this the Custom Code tab.)
- Click Add script.
- Name: anything you'll recognise later, such as "Chat widget".
- Placement: leave it on End of
<body>. The other choices are Start of<head>, End of<head>and Start of<body>. - Page: All, so the widget is on every page.
- Run: leave it on Once. The other choice is On every page visit.
- Paste the two script tags into Code and click Add.

The script then shows as one row in the Code list: name, placement "End of <body>", type "Custom", page "All".
Before you click Add: the Code box is a code editor and wraps long lines, so the break you can see in the screenshot after </ is only wrapping, not a real line break. Check that both <script> tags are complete and that the chatbotId value still has its quotes.
Why End of <body>: on the published page, Framer printed our two tags just before </body>, after the page's own content and scripts, so the chat widget never holds up your page. The loader also has defer, so it waits for the page anyway.
Step 3: How do you publish and check the chatbot on Framer?#
Publish first: Framer's preview doesn't run the script. We clicked the editor's Preview button and waited eight seconds: the page showed our bakery text and no chat launcher. Framer's custom code reaches visitors when you publish, so the preview is the wrong place to check.
Click Publish at the top right. On a site that's already live, the button opens a panel showing the address and the number of unpublished changes; click Update. Then open the live address in a private window.
On our published site:
embed.jsand the widget's start-up request both came back with status 200.- The launcher appeared in the bottom-right corner, with the welcome message above it about a second later.
- We opened the chat, asked a question about the bot's own product, and it answered.

The round pencil button on the right edge of our screenshots belongs to Framer's page, not to the chat widget.
Keep the test short: each answer uses one credit, just like a visitor's question.
Does the "Made in Framer" badge cover the chat button?#
On a free Framer site, yes. This was the biggest thing we found. Framer pins a "Made in Framer" badge to the bottom-right corner of free sites. Laddu Chat's launcher is a 60-pixel circle in the same corner, 20 pixels from the bottom and right edges, and the badge sits on top of it.

What we measured:
- The badge's container has
z-index: 2147483647, the largest value browsers accept. The chat launcher's is 10000, so the badge always wins. - It covers roughly the lower two thirds of the launcher.
- A click in the middle of the launcher opened framer.com in a new tab, not the chat.
- A click on the top edge of the launcher, or on the welcome message, opened the chat. That's why our screenshots show the chat open. A visitor who closes the welcome message is left with the sliver.
The fix is on Framer's side. Framer's help centre says the badge disappears once you connect a custom domain or upgrade the site to a paid plan, and that you must republish for it to go. Laddu Chat has no setting to move the launcher, so a free Framer site is fine for testing the bot, but put the site on a paid Framer plan or a custom domain before you send visitors to it.
Your own floating elements can clash the same way. If the site has a cookie banner or a "Book a table" button in that corner, move it, then check the corner on a phone and a laptop after you publish.
Why is the chatbot tiny on a phone?#
Because the site has no Phone layout. A new Framer project starts with only a Desktop breakpoint, 1200 pixels wide. With only that layout, our published page sent:
<meta name="viewport" content="width=1200">
A phone given that tag draws a 1200-pixel page and shrinks it to fit the screen. Your text shrinks, and so does the chat widget. Worse, the widget thinks it's on a wide screen: Laddu Chat's widget opens full screen only when the page is 768 pixels wide or less, and this page reported 1200.
The fix takes a minute:
- On the canvas, click the + at the right of the Desktop frame's header.
- Choose Phone (390). Framer adds a Phone frame next to the Desktop one.
- Fix anything that runs off the Phone frame. Our text did, because it was placed for 1200 pixels; we set its left offset to 24 and its width to 342.
- Publish → Update.
After that, the same page sent width=device-width, and the phone drew it at its real size.

With the Phone breakpoint in place, tapping the welcome message opened the chat full screen at 390 pixels, and the bot answered. The minimise button at the top right of the chat header closes it.

Two notes from the phone test:
- The badge is there too. On the phone, the "Made in Framer" badge covered the lower part of the launcher just as on desktop. The welcome message stays tappable until a visitor closes it.
- Test with your real phone. Our first phone run used a desktop browser faking an iPhone's user agent, and the chat stuck on "Thinking…": the console showed Cloudflare's bot check failing to load. The same browser at the same width without the fake user agent got an answer. If an emulator stalls like this, check on a real phone before you blame the install.
Is custom code or the Embed component better for a chat widget?#
Use custom code in Settings. It loads the widget on every page, on every breakpoint, and it isn't tied to any layer of your design. Framer also has an Embed component, which you place on the canvas, for things like a booking form inside a page section. We didn't use it for this test: a chat launcher floats over the whole page, so a component placed inside one section is the wrong shape for it.
To keep the widget off a page, such as a thank-you page, edit the script and change Page from All to the pages you want.
What if the chatbot still doesn't appear?#
Check these in order:
- You're looking at the preview or the canvas. Open the published
.framer.appaddress or your own domain. - You haven't published since adding the script. If the Publish panel shows unpublished changes, click Update.
- The badge is covering it. On a free site, look for the top edge of the launcher peeking out above "Made in Framer".
- The script got damaged. View the page source on the live site and search for
embed.js. Both tags should be there, in order, just before</body>. - Embedding is off. Check Enable embedding on website in Settings → Embed Scripts in Laddu Chat.
- A security header blocks it. Our Framer site sent no Content Security Policy. If you've added one, the CSP section of the HTML guide lists the hosts to allow and how to handle the inline config line.
Our published page came back with cache-control: public, max-age=0, must-revalidate, so browsers check for a new version on every load. A private window was enough to see each update straight away.
What does Laddu Chat cost on a Framer site?#
100 free credits, no card; paid plans start at $20 a month. Free bots can go on your site with a small Laddu AI badge, and the 100 free credits reset each month. Framer's plan is a separate bill.
| Plan | Monthly | Bots | Answers a month | Laddu badge |
|---|---|---|---|---|
| Free | $0 | 1 | 100 | Shown, or removed with the $24 a month add-on |
| Starter | $20 | 1 | 2,500 | Shown, or removed with the $24 a month add-on |
| Growth | $75 | 3 | 10,000 shared | Removed |
| Scale | $250 | 50 | 40,000 shared | Removed |
One answer uses one credit, however long it is, and credits are shared by every bot on the account. Visitors who open the widget and ask nothing cost nothing. Full details are on the pricing page. If you build Framer sites for clients, selling a chatbot to web design clients covers how to price it.
Four limits to know before you paste anything:
- Updates are manual. The bot doesn't hear about Framer publishes. You add each page as its own URL, and when you change a price in Framer, click Recrawl on that source, then Retrain. CMS items are separate pages, so add the ones people ask about.
- The launcher stays bottom right. You set colours, the welcome message, suggested questions and an avatar, but not the position, font or CSS. That's why the badge clash is fixed on Framer's side.
- Nobody takes over the chat. There's no live chat or human handoff. When the bot doesn't know, it says so instead of guessing and points visitors to your support email, or offers to take their details if you turn on lead fields. Set a Support Email so visitors have somewhere to go.
- Leads go to your inbox, not a CRM. Turn on lead fields (name, email or phone) and set a Support Email in Configure, and every plan captures leads and emails them to you; Growth and Scale add a Leads dashboard and CSV export. There's no Zapier, HubSpot or webhook connection. Capturing leads with a website chatbot covers what to ask for.
If that fits, create a free account and train the bot on the five or six pages visitors ask about most. Then do the Framer part in this order: paste, publish, and check the bottom-right corner on a phone.
Sources#
- Our Framer test, 30 November 2026: new free Framer account (email sign-in link, no card), Settings → Code → Add script with Placement End of
<body>, Page All, Run Once; editor Preview checked for 8 seconds; published to a freeframer.appaddress; checked at 1280 px and 390 px in Chromium, logged out of Framer. Measured: script printed just before</body>;embed.jsand the widget start-up request 200; "Made in Framer" badge containerz-index: 2147483647covering the lower part of the 60 px launcher, centre click opening framer.com;<meta name="viewport" content="width=1200">with only the Desktop breakpoint andwidth=device-widthafter adding Phone (390); no Content-Security-Policy header;cache-control: public, max-age=0, must-revalidate. - Framer Help, "How to add custom code" (updated 19 November 2026): Custom Code tab in the project settings; Once runs the code a single time, Run on every page visit runs it each time someone visits a page. https://www.framer.com/help/articles/how-to-add-custom-code/ (checked 30 November 2026)
- Framer Help, "How do I remove the Made in Framer badge from my website?": the badge disappears once you connect a custom domain or upgrade to a paid plan; republish afterwards. https://www.framer.com/help/articles/how-do-i-remove-the-made-in-framer-badge-from-my-website/ (checked 30 November 2026)
- Framer Help, FAQ: a custom domain needs a paid plan. https://www.framer.com/help/faq/ (checked 30 November 2026)
- Laddu Chat plans, credits, badge, sources, embed steps, lead capture and limits: Laddu Chat product facts, verified against the product code on 26 and 28 November 2026. Live plans: /pricing
- Laddu Chat embed widget (60 px launcher 20 px from the bottom and right, no position setting, full screen at 768 px or less, welcome message after about a second, inline config line) and the reply when the bot doesn't know: Laddu Chat product facts, "Embed widget" and "When the bot can't answer" sections, verified against the production code on 29 November 2026.
Frequently asked questions#
Can I add custom code to a free Framer site?
It worked in our test on 30 November 2026. On a free Framer account, with no card, we added the chatbot script under Settings → Code → Add script, published to the free framer.app address, and the widget loaded and answered. The catch on the free plan is the 'Made in Framer' badge, which sits in the same bottom-right corner as most chat launchers.
Why doesn't my chatbot show in Framer's preview?
In our test the widget never appeared in the editor's Preview, only on the published site. Custom code reaches visitors when you publish, so click Publish (or Update on later changes) and check the live URL.
Should the chatbot script go in the head or the body in Framer?
Use End of <body>, which is also Framer's default placement in the Add script dialog. On the published page, Framer printed our two script tags just before </body>. The Laddu Chat loader uses defer, so head placement would also work, but there's no reason to choose it.
Should I choose Run 'Once' or 'On every page visit'?
Once, the default. That's what we tested and the widget loaded. Laddu Chat's loader also ignores a second start on the same page, so it never draws two launchers. We tested a one-page site, so on a bigger site click through to a second page after publishing and check the launcher is still there.
Why is the chatbot tiny on my phone?
If your Framer site has only the Desktop breakpoint, Framer serves the page with a viewport 1200 pixels wide, so the phone shrinks the whole page, chat launcher included. Add a Phone breakpoint and republish. In our test that switched the page to width=device-width and the chat opened full screen at 390 pixels.
How much does an AI chatbot on a Framer site cost?
On Laddu Chat: 100 free credits, no card; paid plans start at $20 a month. Free and Starter bots show a small Laddu AI badge, removable with a $24 a month add-on; Growth ($75 a month, three bots) includes badge removal. One answer uses one credit. Framer's own plan is a separate bill. Prices in USD.