How to Add HubSpot Chat to Your Website
HubSpot chat has no separate snippet: it rides on the HubSpot tracking code. Install that code (Settings, Tracking and Analytics, Tracking Code), then build a chatflow under Conversations, Chatflows and set which pages it targets. HubSpot's live chat is free to start; on We.Inc, use the HubSpot add-on.
| Piece | Where in HubSpot | What it does |
|---|---|---|
| Tracking code | Settings > Tracking & Analytics > Tracking Code | Loads HubSpot on your pages |
| Chatflow | Conversations > Chatflows > Create chatflow > Website | Decides what the widget says and where it shows |
| Targeting rules | Inside the chatflow | Lists the URLs or subdomains that get chat |
Updated
Because the chat comes from the tracking code, every chat lands on a contact record with the pages that person viewed. That is the reason to choose HubSpot chat: it is part of a CRM, not a standalone inbox.
Add HubSpot chat on We.Inc, WordPress, Wix, Squarespace or plain HTML
We.Inc
- Open Add-ons from the "..." menu of the builder.
- Pick HubSpot and enter your HubSpot ID.
- Turn it on, then publish.
- Create the chatflow in HubSpot so there is something to show.
Turn on the consent banner add-on as well if you have visitors in the EU or UK.
WordPress
- Install HubSpot's plugin from Plugins, Add New Plugin, or paste the tracking code with a header-scripts plugin.
- Connect your HubSpot account.
- Build the chatflow in HubSpot and target your domain.
WordPress.com needs a plan that allows plugins.
Wix
- Copy the tracking code from HubSpot.
- In Wix, go to Settings, Custom Code, + Add Custom Code.
- Paste it, choose All pages and Body - end, then apply.
- Publish and check the chatflow's targeting.
Requires a premium plan with a connected domain.
Squarespace
- Open Code Injection.
- Paste the HubSpot tracking code in the Footer field.
- Save, then publish the chatflow in HubSpot.
Code Injection is on the Core plan and up.
Plain HTML
- Paste the tracking code before </body> on every page.
- Create and publish a Website chatflow.
- Add every domain and subdomain to its targeting.
Sources
- HubSpot: Live chat software, https://www.hubspot.com/products/crm/live-chat, checked October 28, 2026, for the HubSpot steps
- HubSpot Knowledge Base: Chat widget is not appearing on your pages, https://knowledge.hubspot.com/chatflows/chat-widget-is-not-appearing-on-your-pages, checked October 28, 2026, for the HubSpot steps
- HubSpot developers: Chat widget SDK, https://developers.hubspot.com/docs/api-reference/conversations-chat-configuration/chat-widget-sdk, checked October 28, 2026, for the HubSpot steps
- Wix: Embedding custom code on your site, https://support.wix.com/en/article/embedding-custom-code-on-your-site, checked October 28, 2026, for the HubSpot steps
- Squarespace: Using code injection, https://support.squarespace.com/hc/en-us/articles/205815908-Using-code-injection, checked October 28, 2026, for the HubSpot steps
Consent comes first
The HubSpot tracking code also sets analytics cookies, so it counts as non-essential tracking. Visitors in the EU and UK need to agree before it runs. Set up a consent banner first; our guide on adding a cookie banner covers the options.
Subdomains need their own rule
HubSpot's own example: a chatflow targeted at the main domain does not show on blog.example.com until that subdomain is added to the targeting rules. If chat works on one part of the site and not another, check targeting before anything else.
How it works
- Install the HubSpot tracking code on every page.
- Create a Live Chat chatflow for Website in Conversations.
- Set targeting rules for the pages and subdomains that should show it.
- Publish the chatflow and test from the live site.
Tips
- Already have the tracking code for forms or analytics? Do not paste it twice; one copy is enough for chat.
- In a single-page app, HubSpot's widget SDK has a refresh method for switching chatflows when the route changes.
- Use your logo as the chat avatar so the widget looks like part of your brand.
Frequently asked questions
Is HubSpot live chat free?
HubSpot says you can start live chat and its bot builder free with no card. More advanced chat features sit in Marketing Hub Starter, Professional and Enterprise.
Why is my HubSpot chat widget not showing?
Either the tracking code is missing from that page, or the chatflow's targeting rules do not include the URL or subdomain. HubSpot has a troubleshooting article for exactly this.
Do I need consent for HubSpot chat?
In the EU and UK, yes for the tracking cookies it sets. Show a consent banner and only load HubSpot after the visitor agrees.
Related: Add a cookie banner, Add Intercom, Cookie consent banner examples, Live chat guide, Privacy policy generator.
Start for free or see all free tools. We.Inc is free to start, with no card needed. AI building is on paid plans from $20 a month.
More in Guides
- How to Add an Image Gallery to Your Website
- How to Add Intercom to Your Website
- How to Add the LinkedIn Insight Tag to Your Website
- How to Add Matomo to Your Website
- How to Add the Meta Pixel (Facebook Pixel) to Your Website
- How to Add Microsoft Clarity to Your Website
- How to Add the Microsoft UET Tag to Your Website
- How to Add a Newsletter Signup Form to Your Website
Product
Who It's For
- For Agencies
- For Freelancers
- For Hosting Providers
- For SaaS Platforms
- For Startups
- For Financial Services
- For Healthcare
Features
Resources
- Blog
- Help Center
- Free Business Tools
- Free UI Components
- Website Templates
- Template Collections
- Website Examples
- Guides
- Comparisons
- Alternatives
- Best Lists
- Reviews
- Pricing Guides
- Use Cases
- Glossary & Guides
- Integrations
- Developers
- Benchmark
- Windows App