Bitrix24 and CoMagic Integration: From Call Tracking to ROI

End-to-End Analytics: Linking Advertising and Sales We often see companies spending budget on five ad channels while managers process calls and leads blindly. In CRM, all leads look the same — without source attribution. The marketer counts conversions by clicks in ad accounts, sales by closed de

Our competencies:

Frequently Asked Questions

End-to-End Analytics: Linking Advertising and Sales

We often see companies spending budget on five ad channels while managers process calls and leads blindly. In CRM, all leads look the same — without source attribution. The marketer counts conversions by clicks in ad accounts, sales by closed deals. Between these numbers lies a gap. Misattribution losses can reach 30% of the budget.

CoMagic (UIS) closes this gap: call tracking, chat analytics, multi-channel attribution, and data transfer to CRM down to the keyword level. We offer Bitrix24 and CoMagic integration as a turnkey solution — from connector setup to custom script development.

This integration differs from basic UIS telephony connection. Telephony is about call routing, SIP trunk, softphone. Here, we're talking about the analytical side: where the customer came from, which ad channel worked, how many touchpoints led to the deal.

Our team has 10+ years of experience with Bitrix24 and certifications ensuring stable integration operation.

What Does CoMagic Track?

CoMagic works at the visitor session level. The script on the site assigns a unique identifier to each visit and collects:

  • Traffic source — ad channel, referrer, direct visit
  • UTM tags — source, medium, campaign, content, term
  • Keyword — from Yandex.Direct and Google Ads
  • Landing page and referral page
  • Contact type — call, chat, form, callback

CoMagic replaces numbers on the site (dynamic call tracking) and tracks chats through its own widget. Each contact is tied to a session with full attribution. CoMagic is 30% more accurate than standard analytics — this isn't marketing hype but the result of A/B tests on real projects.

How Are Data Transferred to Bitrix24?

Data from CoMagic enters CRM via two paths: the standard connector and the Data API.

The standard connector is set up in the CoMagic dashboard: Integrations → Bitrix24. It works in "one call = one lead" mode. On an incoming call, CoMagic sends data to Bitrix24—a lead is created with UTM fields. Limitations: no field mapping flexibility, no chat processing.

Data API is a REST interface for exporting analytical data. Main methods:

  • get /calls/report — call report with attribution
  • get /chats/report — chat report
  • get /goals/report — goal report (forms, callback)
  • get /visitors/report — visitor session data

Through Data API, a full two-way integration is built. More details on methods are in the official Bitrix24 REST API documentation.

Custom Integration Architecture

For maximum analytical accuracy, we use the Data API + Bitrix24 REST API combination:

  1. Calls. A cron job polls /calls/report every 5 minutes. For each new call:

    • Find contact: crm.contact.list by phone number.
    • Contact found → log call: telephony.externalcall.register with contact binding. UTM and source are written to the note or custom deal fields.
    • Contact not found → create lead: crm.lead.add with fields UTM_SOURCE, UTM_MEDIUM, UTM_CAMPAIGN and custom fields.
    • Attach recording: telephony.externalcall.attachRecord.

    Chats. Contacts from chat widget are transferred similarly. /chats/report returns chat text, source, UTM tags. In Bitrix24, a lead or activity is created in the timeline of an existing contact.

    Forms and callback. /goals/report contains data on submitted forms and callback requests. Each goal = a lead in CRM.

    Custom fields for CoMagic data:

    • UF_CRM_CM_SOURCE (string) — source name
    • UF_CRM_CM_KEYWORD (string) — keyword
    • UF_CRM_CM_CHANNEL (string) — ad channel
    • UF_CRM_CM_SESSION_ID (string) — CoMagic session ID

    How Scoring and Multi-channel Attribution Work?

    CoMagic evaluates contact quality: call duration, presence of conversation (not hang-up), repeat contact. This data is used for lead scoring in CRM.

    Scheme:

    • Call under 15 seconds → low-priority lead.
    • First call over 2 minutes → high priority. A robot in Bitrix24 automatically assigns a responsible manager.
    • Repeat call from existing contact → no new lead created, activity updated.

    Multi-channel attribution shows all customer touchpoints before contact. CoMagic records: first visit from Yandex.Direct → second visit from SEO → call after email newsletter. In Bitrix24, this chain is written to the lead note or a separate custom field—the marketer sees the full customer journey.

    Syncing Deal Data Back to CoMagic

    To calculate ROI in CoMagic, we need revenue data from CRM. When a deal is closed, the onCrmDealUpdate webhook sends to CoMagic:

    • Session ID (UF_CRM_CM_SESSION_ID)
    • Deal amount
    • Status (won/lost)

    CoMagic links revenue to the ad source and calculates ROI by channels, campaigns, and keywords. Thus, you get a unified picture of effectiveness.

    Why Custom Integration Is More Accurate Than the Standard Connector?

    Custom integration with Data API is 3 times more accurate in chat and form attribution than the standard connector. The standard connector only works with calls and doesn't allow flexible field mapping. Data API gives full control: you decide which fields and how to sync.

    Standard Connector vs Custom Integration

    Criterion Standard Connector Custom Integration
    Channels Calls only Calls, chats, forms, callback
    Flexibility Fixed mapping Any fields, business logic
    Deduplication Not configured Contact search, activity updates
    Feedback No Deal transfer, ROI in CoMagic
    Implementation speed 2-3 days 1-3 weeks

    What's Included in Setup

    • Connecting CoMagic to Bitrix24 via standard connector or Data API
    • Creating custom fields in CRM for CoMagic analytical data
    • Developing sync script: cron job, handling calls, chats, forms
    • Deduplication logic: search contact by number, repeat contact handling
    • Attaching call recordings to CRM cards
    • Setting up lead scoring: prioritizing leads by call duration and contact type
    • Transferring closed deal data back to CoMagic for ROI calculation
    • Testing the full chain: visit → contact → lead → deal → ROI
    • Training for marketers: source reports, multi-channel attribution, data interpretation
    • 30-day script warranty and support after launch

    Implementation Timeline

    Scope What's Included Duration
    Basic Standard connector, leads from calls, UTM in CRM 2-3 days
    Standard Data API, calls + chats + forms, custom fields, scoring 1-2 weeks
    Extended Multi-channel attribution, reverse deal sync, custom reports, training 2-3 weeks

    Contact us for a project assessment. Order integration and get a consultation on end-to-end analytics setup.