chatleadr Docs

How to Add a Chatbot to a Squarespace Website

Squarespace has a Code Injection panel that adds markup to every page of the site. The Chatleadr widget is two script tags, so the Footer box is the whole installation.

Time: about ten minutes. You need: a Squarespace site on a plan that includes Code Injection, and a Chatleadr bot.

Squarespace: where to paste it Settings Advanced Code Injection Footer Footer box <script>window.CHATLEADR_BOT_KEY = "…";</script> <script src="https://chat.chatleadr.com/widget/app.js"></script> The Footer box runs on every page of the site, which is what you want.
Where the Chatleadr snippet goes on Squarespace. Paste it into the body or footer slot, not the head.

1. Set the Bot's Domain#

Open your bot in Chatleadr, go to the Setup tab, and enter your live Squarespace domain in the Domain field. The bot answers on that domain, and on any other addresses recorded for it. The domain is also what the Automatic language setting reads.

2. Copy Your Snippet#

In Chatleadr, open the bot and go to Channels. The Web section shows the snippet with your bot key already filled in.

Channels Website Snippet Paste a code snippet into Wix, Shopify, Squarespace or any other site. Connected Show the snippet Website Snippet Paste this just before the closing </body> tag, on every page you want the chat on. <script> window.CHATLEADR_BOT_KEY = "cl_7f3a9d21"; window.CHATLEADR_API_URL = "https://chat.chatleadr.com"; </script> <script src="https://chat.chatleadr.com/widget/app.js"></script> Copy Done
The snippet in the dashboard already contains your bot key. Copy it from there rather than typing it out.

In Squarespace, go to Settings, then Advanced, then Code Injection.

Paste the snippet into the Footer box and save. The Footer box runs on every page of the site.

4. Check It#

  1. Open your site in a private window.
  2. The launcher appears in the corner within a second or two.
  3. Send a message and confirm a reply comes back.
  4. In Chatleadr, the bot's conversation count goes up by one.
Step 1 Paste the snippet Before the closing body tag,on every page. Step 2 Launcher appears In the corner, within asecond of the page loading. Step 3 The counter moves Send one message. Thedashboard total goes up by one.
What a working installation looks like from the outside.

If It Does Not Appear#

Missing in the editor. Squarespace does not run injected code inside its own editor. Check the live site in a private window instead.

Nothing on the live site either. View source and search for CHATLEADR_BOT_KEY. If it is not there, the snippet was saved to a different box or to a single page's own code injection rather than the site-wide Footer.

Present on most pages, missing on one. Cover pages and some system pages are rendered outside the normal site template and do not receive site-wide injection.

The launcher opens but no reply arrives. The snippet is working and the bot is not answering. Check that the bot is active, then work through my workflow is not triggering.

Common Questions#

Which Squarespace Plan Do I Need for a Chatbot?#

One that includes Code Injection, which is a paid feature rather than part of the entry plan. Squarespace's own pricing page says which tier that is today.

Will the Chatbot Slow My Squarespace Site Down?#

No. The snippet loads from the Footer box and does not block rendering. See install on any website.

Can I Add the Chatbot to One Page Only?#

Yes. Squarespace has a per-page code injection panel under the page's settings. Put the snippet there instead of in the site-wide Footer.

Can One Bot Serve Two Squarespace Sites?#

Yes, once the second site's address is recorded for the bot. Email support@chatleadr.com with the bot's name and that address to have it recorded. Both sites then get the same knowledge, the same workflows and one set of analytics, so two sites that need different answers are better served by two bots. See plans and limits for how many bots each plan includes.

Does a Template Change Remove It?#

No. Code Injection is a site setting rather than part of the template.