Integrating 1C-Bitrix with end-to-end analytics services

Our company is engaged in the development, support and maintenance of Bitrix and Bitrix24 solutions of any complexity. From simple one-page sites to complex online stores, CRM systems with 1C and telephony integration. The experience of developers is confirmed by certificates from the vendor.
Our competencies:
Development stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1175
  • image_bitrix-bitrix-24-1c_fixper_448_0.png
    Website development for FIXPER company
    811
  • image_bitrix-bitrix-24-1c_development_of_an_online_appointment_booking_widget_for_a_medical_center_594_0.webp
    Development based on Bitrix, Bitrix24, 1C for the company Development of an Online Appointment Booking Widget for a Medical Center
    564
  • image_bitrix-bitrix-24-1c_mirsanbel_458_0.webp
    Development based on 1C Enterprise for MIRSANBEL
    747
  • image_crm_dolbimby_434_0.webp
    Website development on CRM Bitrix24 for DOLBIMBY
    655
  • image_crm_technotorgcomplex_453_0.webp
    Development based on Bitrix24 for the company TECHNOTORGKOMPLEKS
    976

Integration of 1C-Bitrix with cross-analytics services

The advertising budget is being spent, requests are coming in, but how many of them resulted in sales — nobody knows. Yandex.Metrica shows conversions on the site, CRM stores deals, 1C records payments — but there's no connection between them. Cross-analytics closes the gap: ad click → website request → CRM deal → 1C payment. For Bitrix, this is a task of integrating multiple systems, and integration points are where everything breaks down.

Data transmission architecture

Cross-analytics is built on user identification at all stages of the funnel. The technical chain:

  1. Advertising system (Yandex.Direct, Google Ads) — assigns yclid/gclid on click
  2. Site on Bitrix — saves the tag in a cookie and passes it to a request form or order
  3. CRM / analytics service — receives the request with a tag, links it to the advertising source
  4. 1C — records payment, data is returned to the analytics service for ROI calculation

Main services: Roistat, Calltouch, CoMagic (UIS), Callibri. Each has its own JS tracker for the site and API for transmitting offline conversion data.

Installing tracker on Bitrix

The tracker is a JS script that collects visit data: traffic source, UTM tags, yclid/gclid, viewed pages, time on site. The script is installed via header.php template or via the insertion management module (Settings → Product Settings → Authorization → Insertions).

For Roistat, the script creates a roistat_visit cookie with a visit number. This number is the key to the entire integration: it must be included in the Bitrix order and then in CRM.

Passing visit number to order. Two options:

  • Order property. Create an order property of type "String" (sale.order.property) with code ROISTAT_VISIT. When placing an order, the frontend script reads the cookie and puts the value in a hidden form field. On the backend — OnSaleOrderBeforeSaved handler, which copies the value to the order property.
  • UTM properties. Bitrix can save UTM tags through the sale module (settings → order properties → UTM auto-fill). The analytics visit number is passed as an additional UTM tag.

Integration with Bitrix24 CRM

If CRM is Bitrix24, lead and deal data is transmitted via REST API. Analytics services (Roistat, Calltouch) have ready-made integrations: in settings you specify the B24 portal URL and token. The service:

  • Retrieves leads/deals via crm.lead.list / crm.deal.list
  • Matches by phone number, email, or visit number (if passed in a UF field)
  • Gets deal statuses for conversion rate calculation by stages

For boxed Bitrix with the crm module (not B24), there are no ready-made integrations — a custom handler is written that sends order data to the analytics service API.

Passing offline conversions from 1C

Payment in 1C is the final point of the funnel. For the analytics service to know that an ad click led to real money, you need to transmit payment data back.

Scheme:

  1. Order in Bitrix contains the analytics visit number (property ROISTAT_VISIT)
  2. When exchanging with 1C, the visit number is passed as a document requisite (added to CommerceML mapping or REST)
  3. When payment is processed in 1C — a handler sends a POST request to the analytics service API: POST /api/push-offline-sales with data {visit_id, revenue, order_id, date}

For Roistat the API method is — POST https://cloud.roistat.com/api/v1/project/add-orders. For Calltouch — POST /api/calls-service/RestAPI/orders/upload.

Alternative to direct 1C integration — an intermediate webhook: Bitrix catches the OnSalePayOrder event, requests the payment status from 1C via REST API, and sends it to the analytics service. This is simpler if 1C doesn't have a developer.

Phone number substitution (call tracking)

Calltouch and CoMagic substitute the phone number on the site — each visitor sees a unique number, calls to which are linked to the visit. For Bitrix, this works via a JS tracker that replaces the number in the DOM.

Pitfalls:

  • Composite cache. The HTML page is cached, the JS tracker replaces the number after loading. If the number is inserted as text in the template — substitution will work. If the number is an image or SVG — no.
  • Component cache. The phone number in the bitrix:main.include component is cached — the tracker should search for the number by CSS class or data attribute, not by text.
  • Mobile app. If the site is wrapped in a PWA via the mobileapp module — the tracker may not load.

Timeline and scope

Stage Work Duration
Tracker installation + pass visit to order JS, order property, handler 2–3 days
CRM integration (B24) Configure ready connector, field mapping 1–2 days
Passing offline conversions from 1C Exchange enhancement, API handler 3–5 days
Call tracking + testing Phone substitution, composite cache testing 1–2 days

Cross-analytics on Bitrix is not "install a script". It's a chain of four or five systems where losing the visit identifier at any stage nullifies the entire effort. It's critical to test the full path: from ad click to payment reflection in the analytics dashboard.