Developing an Analytics Module for 1C-Bitrix Administrator

Developing an Analytics Module for 1C-Bitrix Administrator Imagine: every morning the director spends 30 minutes gathering reports from different admin sections. Revenue — in order reports, conversion — in statistics, returns — in the change log. Data is scattered, no consolidated picture. We dev

Our competencies:

Frequently Asked Questions

Developing an Analytics Module for 1C-Bitrix Administrator

Imagine: every morning the director spends 30 minutes gathering reports from different admin sections. Revenue — in order reports, conversion — in statistics, returns — in the change log. Data is scattered, no consolidated picture. We developed a module that collects everything into one dashboard in seconds.

Over 10+ years we've completed over 500 projects on 1C-Bitrix, and custom analytics is one of the most requested customizations. The module is built on aggregation tables that provide loading speeds 100 times faster than direct SQL. Let's see how it works.

Why standard reports aren't enough

Built-in Bitrix reports are designed for universal scenarios, but every business has its own KPIs. For example, in grocery retail it's critical to track product turnover, while for digital goods — time between order and payment. Without custom analytics, you either tolerate scattered data or spend budget on scripts and Excel summaries.

Data for analytics is spread across several tables:

Metric Table
Orders, revenue b_sale_order
Order contents b_sale_basket
Payment statuses b_sale_pay_system_action, b_sale_order_payment
Cancellation reasons b_sale_order_change
Stock levels b_catalog_store_product
Product views custom log or Yandex.Metrica API

Direct queries to these tables in real time for a dashboard is a bad idea: b_sale_order on an active store contains millions of records. The solution is aggregation tables recalculated nightly and incrementally as needed. This architecture yields read speeds 100 times faster than direct SQL.

Stages of analytics module development

The module implementation process consists of several stages:

  1. Business requirements analysis — identifying key metrics and usage scenarios. We gather manager's wishes and determine what data is needed on the dashboard.
  2. Data schema design — creating aggregation tables with indexes and partitioning for fast loading.
  3. Agent and event development — setting up background tasks for aggregate recalculation and incremental updates every 15 minutes.
  4. Dashboard creation — interface with filters, charts, and tables. Top panel shows key metrics for today.
  5. External API integration — connecting Yandex.Metrica, CRM, mailing services as needed.
  6. Testing and access rights configuration — differentiating report visibility for different roles.
  7. Documentation and training — schema description, agents, admin manual.
  8. Warranty support — 1 month after delivery.

How aggregation works

Create a separate table with daily totals:

-- Daily aggregates CREATE TABLE myvendor_analytics_daily ( date DATE NOT NULL, orders INT DEFAULT 0, revenue DECIMAL(14,2) DEFAULT 0, avg_check DECIMAL(14,2) DEFAULT 0, new_users INT DEFAULT 0, canceled INT DEFAULT 0, PRIMARY KEY (date) ); 

An agent at 02:00 recalculates the previous day and updates the row. Current day data updates every 15 minutes incrementally — from the last processed record by b_sale_order.DATE_STATUS. For more on agent mechanics, see the 1C-Bitrix documentation.

Dashboard structure

Top panel — key metrics for today:

  • Revenue (and % change vs yesterday / last week)
  • Number of orders
  • Average check
  • Conversion: visitors → orders (if Metrica connected)

"Top products" block for selected period: by sales count, revenue, returns count. Data from aggregation table myvendor_analytics_product_daily.

Order funnel. Shows losses at each stage:

  • Added to cart (from b_sale_fuser + b_sale_basket)
  • Proceeded to checkout
  • Paid
  • Received (delivery status)

This is the most valuable report — it shows exactly where money is lost.

Detailed: cohort report

Cohort analysis — how well the store retains customers. A cohort is a group of users who made their first order in the same period (week or month). Cohort analysis objectively evaluates retention.

SQL for cohorts
-- First order of each user WITH first_orders AS ( SELECT user_id, MIN(DATE_TRUNC('month', date_insert)) AS cohort_month FROM b_sale_order WHERE canceled = 'N' AND user_id > 0 GROUP BY user_id ), -- All subsequent orders repeat_orders AS ( SELECT o.user_id, fo.cohort_month, DATE_TRUNC('month', o.date_insert) AS order_month FROM b_sale_order o JOIN first_orders fo ON o.user_id = fo.user_id WHERE o.canceled = 'N' ) SELECT cohort_month, order_month, COUNT(DISTINCT user_id) AS users FROM repeat_orders GROUP BY cohort_month, order_month ORDER BY cohort_month, order_month; 

The result is displayed as a heatmap: rows — cohorts, columns — months after first purchase, value — retention percentage.

Export and report scheduling

Each report exports to Excel (via PhpSpreadsheet or internal tools) and CSV. The module supports scheduling: send a selected report to the manager's email once a week. Scheduling is implemented through Bitrix agents with settings stored in myvendor_analytics_schedule.

Typical mistakes in analytics development

  • Direct SQL queries to b_sale_order in real time — load the database and slow down the store. Use aggregations.
  • Missing indexes on date — without an index, a monthly selection takes minutes.
  • Synchronous aggregate recalculation — better done asynchronously via agents.
  • Ignoring access rights — dashboard should only show data allowed for the role.

What's included

  • Business requirements analysis and architecture design
  • Module development with source code and documentation
  • Integration with external systems (if needed)
  • Testing and access rights configuration
  • Administrator training and password handover
  • 1-month warranty support

Timelines and cost

Scope Composition Timeline
Basic Key metrics + top products + aggregation 3 to 4 weeks
Medium + funnel + cohorts + export 6 to 8 weeks
Extended + Metrica integration + forecasts + scheduling 9 to 13 weeks

Cost is calculated individually based on aggregation complexity and number of integrations. We guarantee transparent estimation without hidden charges. Automating analytics saves up to 40 hours per month — 20% of a manager's working time. If you want a similar dashboard, get a one-day estimate — contact us. Receive a consultation right now.