Live Chat

How to Embed Live Chat on Your Website (Free Chat Script)

A step-by-step guide to adding a live chat script to your website, with where to paste it on the most common platforms.

6 min read Back to all articles

Adding live chat to a website usually means pasting a short script into your pages. The script loads a chat button, visitors click it to talk to you, and you reply from a browser or phone. This guide explains how an embedded chat script works, how to add one to common platforms, and how to choose between hosted and self-hosted chat.

How an embedded live chat script works

A live chat script is a small piece of JavaScript that your chat provider gives you. When a page loads, it:

  • adds a chat button or window to the corner of the page;
  • connects the visitor's browser to the chat service, so messages arrive in real time;
  • tells your agents who is online and which page each visitor is reading.

Because the script loads after your own content, a well-built widget does not slow down the page. Your agents answer from an agent console in the browser or a mobile app.

How to embed chat on your website in 4 steps

1. Create an account with a chat provider. MyLiveChat has a free plan. Choose your widget colours, greeting and working hours.

2. Copy your installation snippet. The provider gives you a script tied to your account. Copy it exactly, because it tells the widget where to send chats.

3. Paste it into every page. The usual place is just before the closing </body> tag in your site template, so it appears on every page at once.

4. Test it. Open the agent console, visit your site in another browser, and send yourself a message.

Where to paste the chat script on common platforms

PlatformWhere the script goes
Static HTMLBefore </body> in each page, or in a shared footer include.
WordPressA header-and-footer scripts plugin, or your theme's footer template.
ShopifyEdit the theme code and paste it before </body> in theme.liquid.
Wix, Squarespace and other buildersThe site-wide "custom code" or "code injection" setting, in the footer.
ASP.NETYour master page or _Layout.cshtml, before </body>.
PHP sitesThe shared footer file your pages include.

Menu names change between versions of each platform, so check its help pages if you cannot find the setting. MyLiveChat also has platform integration guides.

Hosted or self-hosted chat?

Hosted chat (a script from a chat service) is quickest: nothing to install, no server to maintain, and it works on any site. It suits most businesses.

Self-hosted chat runs on your own server, so every conversation stays in your database. Companies with strict data rules often need this. For ASP.NET sites, Cute Live Support is a self-hosted option you can download.

For a fuller comparison, read self-hosted vs SaaS live chat. If you want a group chat room rather than one-to-one support, see how to add a chat room to an ASP.NET website.

What to look for in a website chat script

  • A widget that loads without slowing your pages and works on phones.
  • Visitor monitoring, so you can see who is online and greet them.
  • Canned responses and department routing as your team grows.
  • Mobile apps or a browser console, so agents can answer from anywhere.
  • Chat transcripts and an offline message form for when nobody is online.
  • Clear pricing, including what the free plan covers.

Once chat is running, track how well it works with these live chat metrics.

Questions

How do I embed live chat on my website?

Sign up with a chat provider, copy the installation script it gives you, and paste it before the closing body tag in your site template so it loads on every page. Then send a test message.

Is there a free live chat script for websites?

Yes. MyLiveChat has a free plan that gives you a hosted chat script for any website.

Do I need coding skills to add a chat script?

No. You only paste a snippet into your site template or into your website builder's custom code setting.

Will a chat widget slow down my website?

A well-built widget loads after your page content, so visitors see your page first. Test your page speed before and after installing.

Can I host the chat software on my own server?

Yes. Self-hosted chat such as Cute Live Support for ASP.NET runs on your own server and keeps conversations in your own database.

Learn more: MyLiveChat free live chat script, Cute Live Support (self-hosted)

Ready to ship

Add live chat to your site today.

Start with a free hosted chat script, or run chat on your own server.