Setting Up Ad Spend Connection with Bitrix24 CRM
You're running ads, leads are coming in, but the profitability of each channel is a black box. You spent 500,000 rubles on Yandex.Direct — how much of that came back? Without linking ad spend to your CRM, you won't get the answer. Manually collecting data from three to five ad dashboards and merging it with CRM reports takes up to 10 hours a month and inevitably introduces errors. We solve this with UTM attribution and automatic data import from ad systems. The setup requires working with Yandex, Google, VK APIs, and Bitrix24's REST methods. Our engineers hold 1C-Bitrix certifications and have 7+ years of experience with such integrations. We guarantee data accuracy and transparency for every ruble.
How to Set Up Ad Attribution?
The link "ad → lead → deal → money" is built on UTM tags. Each ad is tagged with UTM parameters that end up in Bitrix24 when a lead is created. After a deal is closed, the revenue from that deal is attributed to the campaign. An automated connection gives 100% accuracy in accounting and requires no manual intervention.
utm_source=yandex&utm_medium=cpc&utm_campaign=brand&utm_term=купить
→ Lead (UF_CRM_UTM_*) → Deal → Amount
+ Costs from Yandex Direct API
= ROI
Manually calculating ROI costs tens of man-hours per month and introduces errors. Automation reduces the time by 12 times and completely eliminates human error.
Structure of Custom Fields
Deals in Bitrix24 need fields to store UTM data:
| Field |
Code |
Type |
| Source |
UF_CRM_UTM_SOURCE |
string |
| Campaign |
UF_CRM_UTM_CAMPAIGN |
string |
| Campaign ID |
UF_CRM_CAMPAIGN_ID |
string |
| Medium |
UF_CRM_UTM_MEDIUM |
string |
| Keyword |
UF_CRM_UTM_TERM |
string |
| Ad ID |
UF_CRM_AD_ID |
string |
Fields are created via crm.userfield.add or in the Bitrix24 interface. When a lead is created from any ad channel (Direct, VK, FB), UTM tags are saved to these fields. When converting a lead to a deal, the fields are copied (configured via Sources in B24 or via REST). Source: Bitrix24 custom fields documentation.
Why Daily Cost Import Is Critical?
Without daily import, you work with outdated data, and ROI is calculated with a delay of up to a week. Our cron script loads the previous day's costs from each ad system into an aggregation table. Automated import is 12 times faster than manual collection and gives you an up-to-date picture every morning.
Example import code from Yandex.Direct
// Yandex.Direct: campaign costs per day
public function importDirectCosts(string $date): void
{
$report = $this->directApi->getReport([
'ReportType' => 'CAMPAIGN_PERFORMANCE_REPORT',
'DateRangeType' => 'CUSTOM_DATE',
'DateFrom' => $date,
'DateTo' => $date,
'FieldNames' => ['CampaignId', 'CampaignName', 'Cost', 'Clicks', 'Impressions'],
]);
foreach ($report as $row) {
AdCostTable::add([
'DATE' => $date,
'SOURCE' => 'yandex',
'CAMPAIGN_ID' => $row['CampaignId'],
'CAMPAIGN' => $row['CampaignName'],
'COST' => $row['Cost'] / 1000000, // Direct returns in microrubles
'CLICKS' => $row['Clicks'],
]);
}
}
Similarly for VK Ads (ads.getStatistics) and Google Ads (Google Ads API, CampaignService). The import works stably, data is always up-to-date.
What Data Is Needed for ROI Calculation?
For accurate calculation, you need three components: costs from ad dashboards, revenue from closed deals in CRM, and correct linking via UTM tags. Comparison of manual vs automated approach:
| Parameter |
Manual Collection |
Automation |
| Time to reconcile data per month |
up to 10 hours |
0 hours |
| Attribution accuracy |
±15% due to errors |
100% |
| Update frequency |
Once a month |
Daily |
| Ability to make operational decisions |
No |
Yes |
ROI Report in Bitrix24
The final report is built with a query that combines costs and revenue:
SELECT
d.UF_CRM_UTM_SOURCE as source,
d.UF_CRM_CAMPAIGN_ID as campaign_id,
SUM(ac.COST) as ad_spend,
COUNT(DISTINCT d.ID) as deals_count,
SUM(d.OPPORTUNITY) as revenue,
ROUND((SUM(d.OPPORTUNITY) - SUM(ac.COST)) / NULLIF(SUM(ac.COST), 0) * 100, 1) as roi_pct
FROM b_crm_deal d
LEFT JOIN local_ad_costs ac
ON ac.CAMPAIGN_ID = d.UF_CRM_CAMPAIGN_ID
AND ac.SOURCE = d.UF_CRM_UTM_SOURCE
AND DATE(ac.DATE) = DATE(d.DATE_CREATE)
WHERE d.STAGE_ID = 'WON'
AND d.DATE_CLOSE BETWEEN :date_from AND :date_to
GROUP BY d.UF_CRM_UTM_SOURCE, d.UF_CRM_CAMPAIGN_ID
ORDER BY roi_pct DESC
The report is displayed in the Bitrix24 administrative section or in an integrated BI tool (Yandex DataLens, Google Looker Studio). Thanks to automation, the ROI of each channel becomes visible in real time.
Common Mistakes When Setting Up Attribution
| Mistake |
Consequence |
Solution |
| Incorrect UTM parameter structure |
Leads not tied to campaigns |
Implement a unified tag template |
| Missing field for campaign ID |
Inability to match costs |
Add UF_CRM_CAMPAIGN_ID |
| Importing costs without including VAT |
Inflated ROI |
Configure correct cost calculation |
| Infrequent data updates |
Making wrong decisions |
Set up daily cron |
Transferring Costs Back to Yandex.Metrica
To display ROI directly in Metrica, you can upload costs via counter.uploadOfflineConversions (deprecated) or through Data2 API. If you have end-to-end analytics via Metrica, you can connect using "Import cost data" from a CSV file generated by Bitrix.
What Is Included in the Work
- Create custom fields in Bitrix24 deals
- Configure UTM transmission when creating leads (all channels)
- Develop cost importers: Direct, VK Ads, FB/Instagram
- Aggregation table
local_ad_costs
- ROI report by campaign with filters for period and channel
- Configure cron schedule for import
- Documentation for deployment and support
- Train managers to work with reports
Work Process
- Analysis: we study your ad dashboards, UTM scheme, and CRM structure.
- Design: we determine custom fields, tables, and import logic.
- Implementation: we write integration code, configure cron, and debug on test data.
- Testing: we verify attribution correctness on real deals.
- Deployment: we deploy to production and hand over documentation.
Estimated Timelines
- Basic setup (Direct + one channel) — 1–2 weeks.
- Multi-channel ROI report with BI dashboard — 3–4 weeks.
Cost is calculated individually after an audit.
Request an audit of your ad channels — we'll find attribution losses. Get in touch for a free consultation on setting up end-to-end analytics. Our certified engineers guarantee transparency and post-deployment support.
How to ensure CRM implementation success?
We have been working with Bitrix24 for over 10 years — during that time we have completed 500+ projects. Every second one starts with the same problem: a company buys CRM, sets it up "by the book," and three months later managers fill two out of twelve fields, deals stall at "Negotiations" for months, and management cannot extract analytics. The root is not bad software — it's the approach. CRM is configured without auditing real processes, without considering staff objections, and without a step-by-step automation plan. In this article — a step-by-step guide on how we avoid this.
All specialists are certified by 1C-Bitrix, the methodology is proven on hundreds of cases. 1C-Bitrix is a platform that, when paired with Bitrix24, provides real end-to-end analytics if configured correctly.
Reality of CRM implementations: 80% fail to deliver results
Why do employees sabotage CRM?
Managers are accustomed to Excel and notepads — they perceive CRM as total control. Our solution: involve key employees at the design stage, show personal benefits — automatic reminders, ready-made proposal templates, less routine. We train on real scenarios, not abstract examples. Resistance drops 4 times faster than with "command" implementation.
How to prevent incomplete data entry?
Mandatory fields are filled, others are ignored — familiar picture? We solve it on three levels:
- Set mandatory fields per funnel stage (only relevant data at each stage).
- Implement auto-fill from UTM tags, email parsing, data from open databases.
- Remove redundant fields — fewer fields, higher quality.
According to our practice, field optimization reduces omission rates by 70% within the first month.
How to design funnels correctly?
Too many stages, no transition criteria, duplicate stages — typical mistakes. We design the funnel based on reality: how sales actually work, not as written in textbooks. We use CRM data from the first 2 weeks of audit to identify real stages and loss points. This shortens the deal cycle by 25–40%.
What automation should be done first?
We set up robots and business processes from day one — so the team immediately feels the difference. For example, lead distribution, sending emails after status changes, creating tasks for colleagues. Companies that implement automation at the start achieve plan targets 3 months faster.
What Bitrix24 features accelerate sales?
- Inquiries from all channels (phone, email, messengers, forms) are captured automatically.
- Leads are created and distributed without manual intervention.
- Visual kanban with custom stages — drag a card to the next stage, an email is sent automatically, a task is created.
- Omnichannel: unified window for telephony, email, WhatsApp, Telegram, Viber, VK, Instagram, online chat.
- Robots and business processes: mailings, document generation, reminders, escalations — no coding required.
- Analytics: funnel, conversions, lead sources, manager workload, average handling time.
What does integrating a 1C-Bitrix website with Bitrix24 CRM provide?
Synergy of the two products yields measurable results, and we implement it through direct data exchange. Site forms transfer leads to CRM instantly with full UTM markup — you see where the client came from. Online chat connects via open lines: a visitor writes on the site, the manager responds from CRM. Orders in the store based on infoblocks v2.0 become deals with full purchase history, enabling cross-selling. Call tracking with number substitution links calls to advertising channels. We use CommerceML to exchange data with 1C Trade Management/ERP: nomenclature, stock balances, prices — synced via agents without manual intervention. End-to-end analytics collects advertising costs, visits, leads, sales in one report — ROI per channel. For non-standard logic, we use REST API and high-load blocks to store arbitrary data (e.g., tech support interaction history). In one project, we configured this bundle for a retail chain: 1C cash register integration with CRM created contacts automatically upon loyalty card purchase, and CRM marketing via Bitrix24 increased repeat purchases by 18% in six months.
How we set up CRM: the process
-
Audit. We analyze how sales work currently. Where are leads lost? Which channels bring clients? We form recommendations before technical implementation.
-
Design. Multiple funnels for different directions, custom fields, mandatory stages and transition conditions. Structure reflects the real process.
-
Integrations. Connect to website, telephony, email, messengers, Yandex.Direct, Google Ads, 1C.
-
Custom modules. When standard is not enough — applications for Bitrix24: specific reports, non-standard business logic, integrations with industry systems.
-
Migration. Transfer databases from amoCRM, Megaplan, Salesforce, HubSpot, Excel. Relationships, communication history, attachments — everything intact.
-
Training. Trainings tailored to your configuration, video instructions, documentation.
What is included in the work?
| Deliverable |
Description |
| Technical documentation |
Funnel scheme, robot settings, field structure, integration plan |
| Access and configurations |
List of integrations, API keys, logins/passwords (provided under NDA) |
| Team training |
2–3 webinars tailored to your configuration, video instructions, cheat sheets |
| Post-implementation support |
2 weeks of incident management + regular usage audits |
Cloud or on-premise: which to choose?
| Parameter |
Cloud (SaaS) |
On-Premise |
| Time to start |
1–2 days |
1–2 weeks |
| IT requirements |
None |
Server and admin required |
| Data control |
Limited |
Full |
| Customization |
Standard limits |
Unlimited |
| Best for |
Teams up to 100 people, standard processes |
Large companies, strict security requirements |
Comparison: the cloud version is 2–3 times cheaper initially, but for B2B companies with large data volumes, on-premise pays off in 1.5–2 years due to no per-user subscription fee.
Metrics we track for your business
-
Funnel stage conversion. If 80% are lost at the proposal stage — the problem is pricing, not managers. Norm: 5–15% for B2B, 1–5% for high-ticket B2C.
-
Lead response time. A 5-minute response increases conversion 10x compared to a 30-minute response. We set alerts — if a manager doesn't respond within 15 minutes, the lead is reassigned.
-
LTV. CRM segments clients by lifetime value — managers focus on the most valuable.
-
Average deal cycle. If it increases, something is broken. Reasons for rejections are gold for product and script adjustments.
Our case studies
Manufacturing company (B2B). A plant with high annual turnover. Leads were lost in email; management only learned about large deals post-factum. We set up automatic inquiry capture, a funnel "qualification → calculation → proposal → approval → contract → payment," and robots that generate proposals from templates. Conversion increased by 23%, lead processing time dropped from 4 hours to 20 minutes. Manager payroll savings exceeded $1,000 per month due to reduced routine.
IT service company. Three funnels: new clients, upselling, tenders. Auto-generation of contracts and invoices, integration with Jira — after signing, tasks automatically appear in the development department. Management received a weighted revenue forecast with 90% accuracy. The project paid off in 4 months.
Implementation timeline and cost
| Scale |
Timeline |
What's included |
| Basic |
1–2 weeks |
Funnel, telephony, email, database import |
| Standard |
1–2 months |
Custom funnels, automation, website and 1C integrations |
| Comprehensive |
2–4 months |
Multiple funnels, custom modules, training, end-to-end analytics |
The cost is calculated individually based on your scope of work. After implementation — tech support with SLA (response from 1 hour), regular usage audits, and feature development.
Ready to discuss your situation? Contact us — we'll conduct a free audit of your current CRM within 2 days and propose an implementation architecture with a result guarantee. Request a consultation — we'll show you in numbers how much you'll save with proper setup.