Sections
1C-Bitrix

How to install the NeuronChat widget on 1C-Bitrix

Paste the dashboard code into the site template footer (footer.php) or into Aspro’s “scripts before </body>” field so chat appears on every page. Below: template, Aspro, multisite, composite cache, and verification.

What to paste

You need the HTML <script> tag from the dashboard — not PHP and not a separate file. data-client and data-agent are unique to the account; do not invent them.

Copy the widget code from the dashboard → Widget. The code looks like this:

<script
  src="https://chatneuron.ru/widget.js"
  data-client="YOUR_CLIENT_ID"
  data-agent="YOUR_AGENT_ID"
  data-variant="card"
  data-api-origin="https://chatneuron.ru"
  defer>
</script>

The same code can go on several sites for one company: shared agent and knowledge base. Paste into the template footer, not into a single page body — otherwise chat only appears there.

Recommended: site template footer.php

This puts the widget on every page of the selected site. Works for “plain” 1C-Bitrix and ready-made solutions (Aspro Max / Next / Premier, Allcorp, and others).

  1. Admin → Settings → Product settings → Sites → Site list. Open the site and check the Template field (for example aspro_max, aspro_next).
  2. Settings → Product settings → Sites → Site templates → open that template.
  3. File footer.php. Find the closing </body> tag.
  4. Paste the widget code before </body>. Do not wrap it in PHP and do not put it in the page visual editor — it strips <script>.
  5. Save the file. Example snippet:
<?php // ... end of template ... ?>

<script
  src="https://chatneuron.ru/widget.js"
  data-client="YOUR_CLIENT_ID"
  data-agent="YOUR_AGENT_ID"
  data-variant="card"
  data-api-origin="https://chatneuron.ru"
  defer>
</script>
</body>
</html>

Aspro: “code before </body>” field

In Aspro Max, Next, Premier and similar solutions, counters often live in solution settings without editing PHP.

  1. Settings → Solution settings (or Aspro: … in the modules menu).
  2. Find a field like Code before closing </body>, Footer scripts, Custom code / SEO or “Advanced” tab.
  3. Copy the widget code from the dashboard → Widget (paste as-is). Save.

If there is no such field, use the template footer.php — more reliable. Do not paste into ordinary page “HTML content” via the visual editor.

Include area or HTML block

  1. If footer.php already has $APPLICATION->IncludeFile("/include/...") — open that file under Content → Site structure and append the script at the end.
  2. Or add an HTML block to the shared template footer (not one news body). Switch to source code mode, otherwise Bitrix removes the script tag.

Several sites on 1C-Bitrix

Two typical cases:

  1. Two separate Bitrix installs (different admins, different domains) — repeat the paste in each site template. Dashboard code is the same.
  2. Multisite in one admin — each site has its own template. Paste into footer.php of the first and second templates. If the template is shared, one paste is enough.

Clear cache

Without this the site often keeps an old HTML page without the script.

  1. Settings → Product settings → Composite site → clear composite cache if composite is on.
  2. Settings → Product settings → Sites → cache clear (or the cache reset button in the top bar).
  3. Open the site in a private window or hard-refresh the page.

Verify

  1. On any inner page (not only the homepage) open “View page source”.
  2. Find widget.js and your data-client. If missing — wrong template or a cached page.
  3. The NeuronChat widget should appear in the lower corner.

Typical failures: visual editor stripped the script; wrong template edited; composite not cleared; code only on one page. An external src="https://chatneuron.ru/widget.js" is usually left alone by Bitrix JS bundling.

next step

Ready to install the widget on 1C-Bitrix?

Create an account, copy the code from the dashboard, and paste it on your site using the steps above.

Get your widget code in the NeuronChat dashboard