Recently, an electronics e‑commerce site came to us: the chat widget wasn't showing on mobile, and leads weren't being created. Turns out, the Content Security Policy was blocking the script, and visitor identification failed because the browser removed the cookie. We fixed it in two hours.
Connecting a Bitrix24 online chat to your site isn't just copy‑pasting a code snippet. It's about configuring visitor identification, integrating with CRM, and ensuring stable, long‑term operation. The Bitrix24 online chat widget can be placed on any platform – WordPress, 1С‑Bitrix, custom SPA – as long as you can insert JavaScript. We handle the entire setup: from widget appearance to CRM integration and 54‑FZ fiscalization. Our team has over 5 years of experience and has completed 30+ chat integration projects.
How the Chat Works Technically
A visitor clicks the widget → the dialog window opens → the message goes via WebSocket to an open channel → an operator replies → the answer appears instantly on the site. Session data is stored in LocalStorage and on the Bitrix24 server. The widget requires PHP 8.1+ and MySQL 5.7+. It loads asynchronously, so it doesn't affect page load speed. According to Bitrix24's official documentation, the widget supports custom events for extended logic. For advanced configurations, you can use webhooks to trigger external actions.
Getting the Widget Code
Navigate to Bitrix24 → CRM → Contact Center → Online Chat → Create, customize the appearance, and copy the embed code. Example:
<script> (function(w,d,u){ var s=d.createElement('script'); s.async=true; s.src=u+'?'+(Date.now()/60000|0); var h=d.getElementsByTagName('script')[0]; h.parentNode.insertBefore(s,h); })(window,document,'https://yourcompany.bitrix24.ru/upload/crm/site_button/loader_X_XXXXXXXX.js'); </script> Insert the code before </body> on every page. For WordPress, use the wp_footer hook or a plugin like Insert Headers and Footers. For 1C‑Bitrix, place it in footer.php or via an HTML block component.
Attaching the Chat to the CRM
During widget setup, specify an open channel (sales or support), enable auto‑creation of a lead on the first message, set the source to 'Site' (SOURCE_ID), and define a data‑collection form (name, phone, email). With proper configuration, lead conversion can increase by up to 30%. For returning visitors, the cookie BITRIX_SM_SALE_UID restores chat history. You can also set up business processes: when a lead is created, automatically send a notification to a manager or trigger a chain of actions via Bizproc. The entire integration process takes an average of 4 hours.
Common Technical Issues and Solutions
| Problem | Cause and Solution |
|---|---|
| Widget doesn't appear | CSP blocks the script. Add *.bitrix24.ru to script-src and connect-src. |
| Messages not sending | Ad blocker or firewall blocks WebSocket. Configure an exception or disable the blocker for the domain. |
| Slow page load | The script loads asynchronously – does not affect LCP. If issues persist, check for synchronous load in <head> (not recommended). |
| Chat overlaps content on mobile | Set margin offsets in Bitrix24 – separate for mobile and desktop. |
| Returning visitors not recognized | Ensure the BITRIX_SM_SALE_UID cookie is not deleted. Enable identification via e‑mail from the form. |
Out‑of‑the‑Box Widget vs. Custom Development
| Feature | Ready Widget | Custom Development |
|---|---|---|
| Setup time | 1–2 days | 1–2 weeks |
| Cost | $500–$1,500 depending on complexity | $3,000–$10,000 |
| Flexibility | Color, position, form | Any logic, integration with 1C, fiscalization |
A ready widget is set up three times faster than a custom solution. For an electronics store that came to us, we implemented a project with 30 operators, 12,000 dialogs per month, and integration with 1C UT and ATOL – response time dropped by 40%.
What's Included in Our Work
- Site audit (platform, caching, CSP).
- Widget installation on all pages with compatibility check.
- Open channel setup, auto lead creation, data collection form.
- CRM integration: link to deals, sync contacts.
- Fiscalization (54‑FZ) if required – via ATOL Online or OFD.
- Testing on mobile and desktop.
- Transfer of access and a quick user guide.
- 2‑year warranty on the installation.
Our Process
- Analysis – examine the site, CSP, stack, caching.
- Design – choose widget type, define CRM fields.
- Implementation – insert code, set up bots, integrate with 1C/OFD.
- Testing – verify WebSocket, lead creation, mobile rendering.
- Deployment – publish to production, monitor for 24 hours.
Timeframes and Cost
Setup takes from 2 hours to 3 days, depending on complexity. The cost is determined after a free audit. Our typical pricing starts at $500 for basic integration. Contact us for a project evaluation – no obligation.
Pre‑Launch Checklist
- Code placement – use
asyncor insert before</body>. - CSP policy – allow
*.bitrix24.ruinscript-srcandconnect-src. - Identification – configure the
BITRIX_SM_SALE_UIDcookie. - Mobile devices – test on real devices.
Set up your Bitrix24 chat today – we'll evaluate your project for free in one day. Get in touch to discuss the details. An online chat is not only convenient for your visitors but also a boost to your conversion rates.

