Integration of Bitrix24 with Roistat

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

Bitrix24 Integration with Roistat

A marketer reports: "We spent 400k on advertising and got 120 leads." The director asks: "How many converted to payment and which channel did they come from?" Silence. Bitrix24's native analytics show sources by UTM, but don't connect ad spend to specific deals across the entire funnel. Roistat solves this — end-to-end analytics from click to payment. However, "connecting Roistat" and "getting working analytics" are two different things. We configure the integration so data aligns correctly.

How Roistat + Bitrix24 Integration Works

Roistat tracks a visitor from the moment they land on your site. On first visit, it sets the roistat_visit cookie — a unique visit identifier. This number ties the entire chain: ad click → site behavior → lead form → CRM lead → deal → payment.

Data transmission scheme:

  1. Visitor lands on the site. Roistat script (pixel) assigns roistat_visit and stores it in a cookie.
  2. Visitor submits a form. The form sends roistat_visit in a hidden field.
  3. Roistat intercepts the lead and creates a lead in Bitrix24 via REST API (crm.lead.add) or native integration. The lead's custom field UF_CRM_ROISTAT_VISIT is populated with the visit number.
  4. Manager processes the lead, converts it to a deal. The visit field is inherited.
  5. Deal closes with amount. Roistat retrieves data via crm.deal.list and links revenue to the advertising channel.

Critical point: if roistat_visit doesn't reach the CRM, Roistat can't connect the deal to advertising. The visit stays unattributed, and the deal has no source. This is the first thing we verify during setup — correct field transmission.

Configuring roistat_visit Transmission to CRM

Roistat offers two integration methods with Bitrix24:

Parameter Native Integration (from Roistat Dashboard) Custom via REST API
Complexity Low — dashboard configuration Medium — requires form and handler customization
Lead Creation Automatic via connector Via crm.lead.add with roistat_visit field
Deal Statuses Funnel stage mapping in Roistat interface Webhook onCrmDealUpdate → Roistat API
Multi-Funnels Limited support Full mapping flexibility
Telephony Integration via Roistat call tracking Requires separate setup

Native integration is enabled in the Roistat dashboard: Settings → Integrations → Bitrix24. You provide the portal URL and REST API token with CRM permissions. Roistat automatically creates the custom field UF_CRM_ROISTAT_VISIT in leads and deals.

For custom integration, the field is created manually via crm.lead.userfield.add:

  • FIELD_NAME: UF_CRM_ROISTAT_VISIT
  • USER_TYPE_ID: string
  • LABEL: Roistat Visit ID

A similar field is created in deals via crm.deal.userfield.add.

Call Tracking and Offline Conversions

Roistat substitutes phone numbers on your site — similar to CoMagic and Calltouch. Each visitor sees a unique number tied to their roistat_visit. When they call, Roistat knows the source and passes the data to the CRM.

For call tracking to work:

  • Roistat configures a pool of substitute numbers and maps them to advertising channels.
  • Calls are sent to Bitrix24 via telephony.externalcall.register with roistat_visit binding.
  • Call recordings are attached via telephony.externalcall.attachRecord.
  • Leads are created automatically with the source pre-filled.

Offline conversions (in-office payment or contract signing) are sent back to Roistat via deal status. When a manager moves a deal to "Successfully Completed" — a webhook sends the data to Roistat API with the amount.

ROI by Channel, Campaign, and Keyword

Roistat imports ad spend from platforms:

  • Yandex Direct — spend by campaign, ad group, keyword
  • Google Ads — similar, including Performance Max
  • VK Ads, myTarget — campaign-level spend
  • Facebook / Instagram Ads — via Meta business account

Spend data is matched against CRM revenue. Roistat reports show:

  • Spend and revenue per channel
  • ROI = (revenue − spend) / spend × 100%
  • CPL (cost per lead), CPO (cost per order), LTV
  • Granular breakdown down to keyword — which search query brought paid deals

For accurate ROI calculation, managers must close deals with the amount filled in. A deal without an amount = zero revenue. This is an organizational task, but without it, the technical integration is pointless.

Custom Reports and Multi-Touch Attribution

Roistat's standard reports cover 80% of needs. For the remaining 20%, use:

  • Multi-touch analytics — Roistat accounts for all customer touchpoints, not just first or last. Models: linear, time-decay, position-based, custom.
  • Cohort analysis — revenue from customers acquired in a specific month, tracked over time. Shows real LTV.
  • Manager performance report — which managers convert leads from paid traffic most effectively.

For exporting data to third-party BI systems, use Roistat API: /project/analytics/data — returns raw data on visits, leads, and deals.

Implementation Timeline

Scale What's Included Timeline
Basic Native integration, one funnel, 1-2 ad channels, verify roistat_visit transmission 3-5 days
Standard Multi-funnels, call tracking, 3-5 ad channels, report setup 1-2 weeks
Extended Custom REST integration, multi-touch attribution, offline conversions, team training 2-3 weeks

What We Configure

  • Install Roistat pixel on site, verify roistat_visit in cookie
  • Connect Bitrix24 to Roistat: authentication, field mapping, create UF_CRM_ROISTAT_VISIT
  • Set up visit number transmission via site forms (hidden fields, JavaScript)
  • Map CRM funnel stages → Roistat statuses
  • Connect ad accounts for spend import
  • Configure call tracking: number pool, site substitution, call transmission to CRM
  • Set up webhooks to send closed deals and amounts back to Roistat
  • Verify end-to-end chain: click → visit → lead → deal → payment → ROI
  • Train marketer: report reading, attribution model selection, common pitfalls (missing roistat_visit, deals without amounts)