1C-Bitrix Custom Pop-up Module Development

A pop-up window that appears at the wrong time is annoying. The same window at the right moment with a relevant offer brings subscribers and sales. The difference lies in triggers, targeting, and technical implementation. We have over 5 years of experience developing pop-up modules for 1C-Bitrix and

Our competencies:

Frequently Asked Questions

A pop-up window that appears at the wrong time is annoying. The same window at the right moment with a relevant offer brings subscribers and sales. The difference lies in triggers, targeting, and technical implementation. We have over 5 years of experience developing pop-up modules for 1C-Bitrix and have completed more than 20 projects. Bitrix has no built-in pop-up constructor. Marketplace solutions are overloaded and conflict with composite cache. Custom development gives full control: what we show, to whom, when, and how often. A custom pop-up loads 3 times faster and does not conflict with cache.

Why a custom pop-up is better than off-the-shelf solutions

Marketplace solutions often have unnecessary dependencies, integrate poorly with custom logic, and do not always support modern triggers. Our approach is a module managed via an infoblock with a flexible system of triggers and targeting. We guarantee compatibility with composite cache and no conflicts with other modules.

How show triggers work

A trigger is an event that initiates a pop-up display. Technically, each trigger is a JavaScript handler that calls a function to show the modal window.

Exit-intent — the cursor moves to the top edge of the viewport. Tracked via mouseleave on document.documentElement. On mobile — scroll up, detected via touchmove:

document.addEventListener('mouseleave', (e) => { if (e.clientY < 10) showPopup('exit-intent'); }); 

Scroll depth — user scrolled 50%, 70%, or to the end of the page. We use IntersectionObserver on a marker element or calculate percentage via window.scrollY / (document.body.scrollHeight - window.innerHeight).

Time on page — setTimeout with a delay of 15-30 seconds.

Inactivity — user does not move mouse or scroll for 10 seconds. Implemented via a debounce timer, reset on mousemove, scroll, keydown.

Click on element — standard addEventListener('click'). Number of pages viewed — counter in sessionStorage, e.g., after 3 pages.

How to set up targeting for different user groups

A pop-up without targeting is spam. Conditions are checked on the server when generating the config and on the client when the trigger fires.

Server-side conditions (formed in the PHP component):

  • User group (authorized / guest / specific group) via $USER->GetUserGroupArray().
  • Site section: only catalog, homepage, exclude cart via $APPLICATION->GetCurDir().
  • Device type: desktop / mobile via User-Agent.
  • UTM tags: show to visitors from an ad campaign, checking $_GET['utm_source'] with session storage.

Client-side conditions:

  • Show frequency: no more than once a day / per session / per 3 visits via localStorage with timestamp.
  • Dismissal: if user closed the pop-up — do not show again, flag popup_{id}_closed.

Architecture: component + infoblock

Pop-ups are managed through an infoblock. Each element is a separate pop-up with settings:

Property Type Purpose
TRIGGER_TYPE List exit-intent, scroll, timeout, inactivity
TRIGGER_VALUE String Scroll percentage / delay seconds
TARGET_PAGES String URL mask: /catalog/, /, exclusions
TARGET_GROUPS Binding User groups
SHOW_FREQUENCY List once, daily, session
POPUP_TEMPLATE List Template: subscribe, promo, feedback
CONTENT HTML Pop-up content
ACTIVE_FROM / ACTIVE_TO Date Activity period

The component local:popup.manager is included in header.php. It selects active pop-ups, filters by server conditions, and generates a JSON configuration for JavaScript.

Compatibility with composite cache

Composite cache caches HTML. If the pop-up configuration is embedded in HTML, the cached page will have an outdated set. The solution is to move the configuration to an AJAX endpoint. When the page loads, JavaScript requests /ajax/popup_config.php and receives JSON. The page is fully cached, the configuration is always up-to-date. The request weighs 1-3 KB and executes in 20-50 ms. A dynamic Bitrix Frame is an alternative for complex scenarios.

Typical templates

Email subscription — form with a single field and button, sending via AJAX to a handler that adds the email to the Bitrix mailing list (\Bitrix\Sender\Internals\Model\PostingRecipientTable) or via the API of an external service. Double opt-in is mandatory to comply with Federal Law 152.

Promo code — display a discount code with copy-on-click. The code is taken from coupons of the sale module (\Bitrix\Sale\Internals\DiscountCouponTable). You can generate a unique coupon for each visitor.

Callback — form with name + phone, sending creates a lead in Bitrix24 CRM via REST API (crm.lead.add) or writes to a local infoblock.

Display analytics

Without analytics, it is unclear if the pop-up works. Minimum — three metrics: impressions, closures, conversions. Data is sent to Yandex.Metrica / Google Analytics via ym(COUNTER_ID, 'reachGoal', 'popup_show_' + popupId) or to a custom table b_popup_stats.

What is included in the work

  • Architecture design and infoblock setup (2-3 days)
  • Development of a custom component with triggers and targeting (5-7 days)
  • Integration with composite cache via AJAX (1-2 days)
  • Setup of impression and conversion analytics (1 day)
  • Documentation and administrator training (1 day)
  • One month of support after launch

Timeline and cost

Option Scope Duration Typical cost
Single pop-up Fixed trigger, one template, no admin management 2-3 days $200
Constructor Infoblock, multiple triggers, targeting, composite compatibility, analytics 7-12 days $500-$800

We will evaluate your project and offer an optimal solution. Contact us — we will calculate timelines and cost individually.