Setting up Banner Management on 1C-Bitrix
Banners on Bitrix can be implemented two ways: through built-in advertising module or through infoblock. The advertising module has specialized functionality for ad shows, but requires "Small Business" edition and above. Infoblock approach is simpler and works on any edition.
advertising module: when it's needed
The advertising module (/bitrix/modules/advertising/) provides: banner rotation, show limitation per user/session, click and impression statistics, A/B testing of banners. All stored in tables b_adv_banner, b_adv_contract, b_adv_stat_day.
Component bitrix:advertising.banner is called in template specifying contract (ad campaign) and banner type. System automatically selects needed banner from contract by show weights.
Use advertising if real show statistics or frequency capping of one banner is needed.
Infoblock approach: simpler for editors
For most corporate sites, not ad campaigns but just "slider on homepage" and "banners in sidebar" are needed. Infoblock with banners is simpler to manage:
Create infoblock banners. Element properties:
-
BANNER_ZONE— type "List", values:main_slider,sidebar,category_top. Binding to position on site -
LINK_URL— click destination URL -
LINK_TARGET—_self/_blank -
IMAGE— image (or use standardPREVIEW_PICTURE) -
IMAGE_MOBILE— separate image for mobile -
REGIONS— for multi-regional sites -
ACTIVE_FROM/ACTIVE_TO— standard fields for temporary show
In component bitrix:news.list on needed place in template request banners with filter by BANNER_ZONE:
$APPLICATION->IncludeComponent('bitrix:news.list', 'banners', [
'IBLOCK_ID' => BANNERS_IBLOCK_ID,
'FILTER' => ['PROPERTY_BANNER_ZONE' => 'main_slider'],
'SORT_BY1' => 'SORT',
'CACHE_TYPE' => 'A',
'CACHE_TIME' => 1800,
]);
Managing banners through visual editor
For editor convenience — bind banners to site sections through IBLOCK_SECTION_ID. Then in admin interface editor goes to needed catalog or page section and sees only banners tied to it.
Alternative: Bitrix has "Content Manager" (/bitrix/admin/content.php) for managing page content without entering full admin panel. Banner infoblock can be added to this interface for non-technical editors.
Temporary banners and scheduling
ACTIVE_FROM and ACTIVE_TO fields allow scheduling banner show. But component cache may "freeze" outdated banner. Solutions:
- Set
CACHE_TIMEless than banner change interval - Configure agent that clears cache when
ACTIVE_TOexpires — throughBXClearCache()with path to component cache - Use
CACHE_TYPE = 'N'for banner components with frequent change — load is small, and banner cache often not needed
Click statistics without advertising module
For simple click tracking on banners from infoblock — AJAX handler. On banner click send request to /local/ajax/banner_click.php?id=XXX, increment counter in element property through CIBlockElement::SetPropertyValues(). Cheap and sufficient for basic analytics.







