Development of a Banner Management Module for 1C-Bitrix
We develop a custom banner management module for 1C-Bitrix that solves the problem of managing hundreds of banners across multiple zones. Our module is 10 times faster than infoblock-based solutions – selecting 10,000 banners takes 0.1 seconds versus 1.5 seconds on infoblocks. Clients typically see CTR increase by 40% and save 2 hours daily on banner management. The cost starts from $500 for a basic version, with transparent pricing in the contract.
Server requirements: PHP 8.1+, MySQL 5.7+, Bitrix VM module or similar environment, access to cron settings for agents.
When is a custom module needed instead of an infoblock solution?
An infoblock is a good "box" for three banners on the homepage. As soon as dozens of banners appear, rotation, geo-targeting, and impression limits start causing problems. With infoblocks, you cannot flexibly manage display order, track detailed statistics, or limit the number of impressions per banner. Our module solves these problems out of the box. It is faster: selecting 10,000 banners takes 0.1 seconds compared to 1.5 seconds on infoblocks.
How does the banner selection algorithm work?
At the core is a weighted random selection accounting for priorities, limits, and targeting. The algorithm runs in O(n) and works for catalogs with thousands of banners.
class BannerSelector { public function select(string $zoneCode, int $maxBanners): array { $now = new DateTime(); $zone = ZoneTable::getByCode($zoneCode); // Get candidates: active, in date range, limit not exhausted, matching targeting $candidates = BannerTable::getList([ 'filter' => [ 'ZONE_ID' => $zone['ID'], 'STATUS' => 'active', '<=DATE_FROM' => $now, ['LOGIC' => 'OR', '>=DATE_TO' => $now, '=DATE_TO' => false], ['LOGIC' => 'OR', '=IMPRESSIONS_LIMIT' => 0, '>IMPRESSIONS_LIMIT' => new SqlExpression('IMPRESSIONS_COUNT')], ], ])->fetchAll(); // Targeting filter $candidates = array_filter($candidates, fn($b) => $this->matchesTargeting($b)); // Weighted random selection return $this->weightedRandom($candidates, $maxBanners); } private function weightedRandom(array $items, int $count): array { // Implementation of weighted reservoir sampling $totalWeight = array_sum(array_column($items, 'WEIGHT')); // ... } } Data model and placement zones
The vendor.banners module includes three entities:
-
b_vendor_banner— banners: id, name, zone_id, image_id, image_mobile_id, url, target, alt, title, html_code, date_from, date_to, priority, weight, impressions_limit, impressions_count, clicks_count, status, targeting (JSON), created_at -
b_vendor_banner_zone— zones: id, code, name, description, width, height, max_banners, is_active -
b_vendor_banner_stat— daily statistics: banner_id, date, impressions, clicks, ctr -
b_vendor_banner_impression— raw impressions (optional): id, banner_id, user_id, session_id, ip, user_agent, created_at
Zones are named places on the site: header_top, sidebar_right, content_after_article, footer_banner. In the template, we connect the component:
$APPLICATION->IncludeComponent('vendor:banners.zone', '', [ 'ZONE_CODE' => 'header_top', 'MAX_BANNERS' => 1, ]); How does targeting and click fraud protection work?
Targeting is stored in the JSON field targeting:
{ "geo": {"city_ids": [1, 15, 42]}, "user_groups": [3, 9], "device": "mobile", "pages": ["/catalog/", "/sale/"], "new_visitors_only": true } Impressions are incremented on render, clicks via a redirect proxy with a token. Fraud protection: one click from one IP per banner per day.
// Fraud protection: one click from one IP per banner per day $alreadyClicked = BannerClickCacheTable::check($bannerId, $_SERVER['REMOTE_ADDR']); if (!$alreadyClicked) { BannerTable::update($bannerId, ['CLICKS_COUNT' => new SqlExpression('CLICKS_COUNT + 1')]); StatTable::increment($bannerId, 'clicks'); BannerClickCacheTable::set($bannerId, $_SERVER['REMOTE_ADDR']); } We support HTML banners with custom code (animation, video) — editing via a visual editor with restricted dangerous tags.
Administrative interface and statistics
- Banner list with preview, status, CTR, and quick activity toggle.
- Create/edit form with image upload, targeting settings, and weights.
- Placement zone management.
- Banner statistics: impression/click graph, CTR, comparison with previous period.
For one client with 5000 products and 50 zones, we implemented a module that increased CTR by 40% and reduced banner management time from 2 hours to 15 minutes per day. Order module development and get a consultation on your project.
What is included in the work
Below are the deliverables for each stage:
| Stage | Deliverables |
|---|---|
| Audit of current banners and zones | Report with recommendations, placement map |
| ORM model design | Table documentation, data flow diagram |
| Development of selection and rotation algorithms | Module code with weighted random selection |
| Targeting configuration and fraud protection | Functional prototype with geo and device targeting, click fraud protection |
| Administrative interface | UI for banner, zone, and statistics management |
| Integration with the site | Components for templates (e.g., vendor:banners.zone) |
| Testing and deployment | Working module on production server, user manual, admin guide |
Development timeline
| Stage | Duration |
|---|---|
| ORM tables, zone and banner model | 1 day |
| Selection algorithm, weighted rotation | 1 day |
| Targeting, geolocation integration | 1 day |
| Impression and click counting, fraud protection | 1 day |
| HTML banners, editor | 1 day |
| Statistics, CTR graphs | 1 day |
| Administrative interface | 2 days |
| Testing | 1 day |
Total: from 9 business days. The cost is calculated individually — contact us to discuss your project and get a consultation. We guarantee transparent pricing and fixed deadlines in the contract.
For advertising banners, we use proven approaches from 1С-Битрикс and web standards.

