Setting up Click Heatmaps on 1C-Bitrix: A Complete Guide for 2025

Setting up Click Heatmaps on 1C-Bitrix Imagine: on a catalog page 80% of clicks land on the product name, yet the link only leads to the "Add to cart" button. A click heatmap visualizes this behavior—a clear sign that the layout doesn't match user expectations. But for the map to be reliable, it

Our competencies:

Frequently Asked Questions

Latest works

  • B2B ADVANCE company website development
    B2B ADVANCE company website development
    1460
  • Website development for FIXPER company
    Website development for FIXPER company
    1019
  • Development based on Bitrix, Bitrix24, 1C for the company Development of an Online Appointment Booking Widget for a Medical Center
    Development based on Bitrix, Bitrix24, 1C for the company Development of an Online Appointment Booking Widget for a Medical Center
    764
  • Development based on 1C Enterprise for MIRSANBEL
    Development based on 1C Enterprise for MIRSANBEL
    882
  • Website development on CRM Bitrix24 for DOLBIMBY
    Website development on CRM Bitrix24 for DOLBIMBY
    809
  • Development based on Bitrix24 for the company TECHNOTORGKOMPLEKS
    Development based on Bitrix24 for the company TECHNOTORGKOMPLEKS
    1166

Setting up Click Heatmaps on 1C-Bitrix

Imagine: on a catalog page 80% of clicks land on the product name, yet the link only leads to the "Add to cart" button. A click heatmap visualizes this behavior—a clear sign that the layout doesn't match user expectations. But for the map to be reliable, it must be correctly configured for 1C-Bitrix. According to our statistics, 90% of heatmap issues on this CMS stem from AJAX content and dynamic loading. Fixing this yields accurate data as early as the next day. In this article we'll dive into how to configure tools (Yandex.Metrica, Hotjar, Clarity) without losing data. For a quick start, contact us—we'll help with selection and integration.

Choosing a Heatmap Tool

Tool Bitrix Specifics Recommendation
Yandex.Metrica (click map) Requires reinitialization on AJAX For simple sites without SPA; setup is 2x faster than Hotjar
Hotjar Full sessions, field masking, segmentation For detailed UX analysis; starts at $39/month
Microsoft Clarity Automatically records clicks, field masking Best free alternative; 3x cheaper than Hotjar

Yandex.Metrica is better for sites with minimal dynamics, Clarity for free session recording. Hotjar offers more details but requires a budget.

Yandex.Metrica: Built-in Click Map

The most accessible tool is the built-in click map of Yandex.Metrica. It is enabled with the clickmap: true flag. No additional code is needed—Metrica intercepts clicks via a global event handler.

The problem on Bitrix arises with AJAX navigation and dynamically added elements. Metrica binds handlers on page load—clicks on elements that appear after an AJAX response (e.g., products in infinite scroll) are not captured in the map. Solution: call ym(ID, 'hit', url) after each AJAX update. This reinitializes the tracker and records clicks on new elements. More details on handling AJAX in Bitrix.

Why AJAX Clicks Aren't Recorded in the Standard Map?

The standard tracker binds event handlers on page load. After an AJAX request, the DOM changes but handlers remain on old elements. To fix this, after each AJAX update call ym(ID, 'hit', url) for Metrica or hj('identify') for Hotjar. With Clarity, reinitialization is unnecessary—it automatically tracks changes. In practice, if your site uses infinite scroll in the catalog, without modification you may lose up to 30% of clicks. A properly configured integration raises recording accuracy to 95%. For example, fixing a misconfigured heatmap saved one client $1,500 monthly in ad optimization.

Hotjar and Microsoft Clarity on Bitrix

For more detailed heatmaps, Hotjar or Microsoft Clarity are used. Both are added via a single script in <head>. In Bitrix, this is done through init.php or directly in the template:

// In header.php of the template \Bitrix\Main\Page\Asset::getInstance()->addString( '<script>/* Hotjar Tracking Code */ (function(h,o,t,j,a,r){ h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)}; h._hjSettings={hjid: XXXXXXX, hjsv: 6}; a=o.getElementsByTagName("head")[0]; r=o.createElement("script"); r.async=1; r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv; a.appendChild(r) })(window,document,"https://static.hotjar.com/c/hotjar-",".js?sv="); </script>', true ); 

How to Exclude Service Pages from the Heatmap?

Click maps should not collect data on login, cart, checkout pages—they contain personal data. Exclusion protects against leaks and complies with 54-FZ. In Yandex.Metrica, use "Filters" in counter settings: exclude /bitrix/, /personal/, /cart/, /order/. For Hotjar, use the suppressSession parameter or conditional initialization in the template:

<?php $excludePaths = ['/cart/', '/order/', '/personal/']; $currentPath = $_SERVER['REQUEST_URI']; $exclude = false; foreach ($excludePaths as $path) { if (strpos($currentPath, $path) === 0) { $exclude = true; break; } } if (!$exclude): ?> <!-- Hotjar script --> <?php endif; ?> 

Special Considerations for Login Pages

Personal account and checkout pages in Bitrix are wrapped by the bitrix:main.login.form component or rules in the main module. Hotjar and Clarity record such pages, but if a user is not logged in, the URL may redirect—the tracker will record clicks on the login page instead of the target. Check via the "Pages" report in Clarity: if /order/ appears with zero clicks and a high exit rate, users are not reaching it due to redirect.

How to Segment Heatmaps by Device?

Click heatmaps on mobile and desktop should be analyzed separately. In Hotjar it's automatic with a toggle. In Metrica, use segments in the "Click Map" report. Bitrix adaptive templates often change element order on mobile (CSS order), so a "red spot" on desktop and mobile will be on different DOM elements, even if visually in the same screen location. Analyze separately to avoid missing UX issues.

Example code for reinitializing Yandex.Metrica after AJAX
BX.addCustomEvent('onAjaxSuccess', function(){ ym(ID, 'hit', window.location.href); }); 

Experience and Guarantees

Our team has 8 years of experience in 1C-Bitrix development, certifications, and over 200 completed projects. We guarantee correct heatmap operation accounting for AJAX, SPA, and responsiveness. By our estimates, incorrect configuration can reduce data accuracy by up to 30%, and missed opportunities from wrong decisions can reach a significant portion of turnover. With proper integration, accuracy rises to 95%. Investment of $500 in setup pays back quickly. Get a consultation—contact us to discuss your project.

What's Included in the Work?

  • Selection of optimal tool (Metrica, Hotjar, Clarity) based on business needs
  • Integration via template or init.php with caching considerations
  • Exclusion of service pages (personal account, cart, checkout)
  • AJAX navigation modifications for correct click recording on dynamic elements
  • Device segmentation and team training on report usage

Setup Process

  1. Analysis — study site architecture, identify problem areas (AJAX, redirects)
  2. Planning — choose tool and integration scheme, agree on exclusions
  3. Implementation — add code to template, set up reinitialization
  4. Testing — verify recording on all page types and devices
  5. Deployment — launch to production and provide access to reports

Timeline: 1 to 3 business days depending on complexity. For an accurate estimate, contact us—we'll provide a free consultation and find the best solution.

Stage Time (hours)
Analysis and tool selection 1-2
Integration and exclusions 2-4
AJAX adjustments 2-6
Testing 1-2
Total 6-14

Order heatmap setup — we will conduct an audit within 1 day and offer the optimal solution.