1C-Bitrix Web Analytics: GTM, GA4, Yandex Metrica Turnkey

Web Analytics on 1C-Bitrix: GTM, GA4, Yandex Metrica Turnkey After a standard Bitrix installation, analytics counters are not connected—the developer must manually place the Google Analytics and Yandex Metrica codes. A typical mistake is inserting the code directly into the template without consi

Our competencies:

Frequently Asked Questions

Web Analytics on 1C-Bitrix: GTM, GA4, Yandex Metrica Turnkey

After a standard Bitrix installation, analytics counters are not connected—the developer must manually place the Google Analytics and Yandex Metrica codes. A typical mistake is inserting the code directly into the template without considering caching: the counter ends up in the cache and is delivered incorrectly, especially with the active cache module. As a result, data on traffic, conversions, and user behavior is distorted, and business decisions are made based on unreliable statistics. For online stores on Bitrix, data loss means incorrect assessment of advertising effectiveness and missed profit. We solve this problem in 1–2 days, guaranteeing correct counter operation on all pages: from the homepage to product cards with dynamic parameters.

How to Avoid Conflict with Counter Caching?

Bitrix caches HTML blocks, and if the counter code falls inside a cached area (e.g., inside $APPLICATION->StartResultCache()), it is served identically to all users—unique parameters cid and gclid are not passed. In GA4, this leads to a loss of 30–50% of sessions. According to the documentation at dev.1c-bitrix.ru, counter caching requires placement outside cached areas. We move counters to footer.php or use tagged caching with dynamic exceptions.

What Problems Does Web Analytics Setup on Bitrix Solve?

Lack of end-to-end analytics. Many stores on Bitrix are integrated with 1C, CRM, and payment gateways (YuKassa, Sber, ATOL Online). Without end-to-end analytics, it's impossible to track the customer journey from click to payment. We configure Google E-commerce Enhanced transmission via Google Tag Manager and synchronize data with b_sale_basket and b_sale_order.

Incorrect traffic filtering. By default, reports include administrators, distorting metrics. We set up filtering by IP and cookie—exclude internal users. For online stores, this can reduce the "clean" conversion rate by 15–25%, but the data becomes real.

Why Google Tag Manager Is Better Than Direct Code?

We use Google Tag Manager as a single container for all scripts: GA4, Yandex Metrica, VK pixel, Facebook Pixel. This allows you to update codes without editing the template and without recaching. The principle scheme:

  1. In the header.php file, we add two GTM calls: in <head> and immediately after <body>.
  2. We wrap them in a check (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) die(); — this is mandatory for security.
  3. We place the code outside cached blocks: after the closing <?$APPLICATION->ShowHead()?>.
  4. For each page type (homepage, catalog, detail, cart), we create triggers in GTM that pass parameters via Data Layer.

Example of minimal GTM installation in footer.php:

<?php if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) die(); ?> <!-- Google Tag Manager (noscript) --> <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XXXX" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> <!-- End Google Tag Manager (noscript) --> 

Comparison of methods: direct code placement (GA4, Metrica) vs GTM

Parameter Direct Code in Template Google Tag Manager (GTM)
Setup speed 1–2 hours 2–3 hours (with trigger setup)
Changes without developer No Yes, through GTM interface
Cache conflict High risk Low (proper setup)
Support for GA4 + Metrica + retargeting Only via multiple code snippets Single container
Error probability Medium Low (validation in GTM)

GTM speeds up change implementation by 3 times: no need to edit the template, recache, or test via dev environment. All changes are made through the GTM interface and published in 1 minute.

Work Process

  1. Analytics: audit current counters, identify cache issues, verify goals.
  2. Design: Data Layer schema, triggers for events (add to cart, checkout, registration).
  3. Implementation: install GTM, configure GA4 and Metrica, filter internal traffic, create initial set of goals.
  4. Testing: verify on catalog pages, product cards, cart. Use Google Tag Assistant and Network requests.
  5. Deploy: transfer settings to the live site, monitor for the first 48 hours.

Estimated Timelines

  • Basic setup (GTM, GA4, Metrica, 5 goals) — 2 to 4 days.
  • Extended (end-to-end analytics, 1C integration, conversion funnel, A/B tests) — 5 to 8 days.

Pricing is calculated individually—depends on catalog complexity, number of integrations, and required reports. Request a preliminary assessment—we will analyze your project in 1-2 days.

What Is Included in the Work

The work includes setting up the GTM container and placing codes for GA4, Yandex Metrica, and social media pixels; developing end-to-end analytics with data transmission via Data Layer; filtering internal traffic and excluding admin IPs. We also provide documentation on GTM triggers and variables, access to the container for self-management, and training for your employee. After deployment, we offer post-support for two weeks.

Typical Errors and Their Solutions

Error Cause Solution
Counter missing on internal pages Code inserted only in the main template Place GTM in all template types via footer.php
Data loss with caching enabled Code inside a cached block Move code outside StartResultCache() or use dynamic exceptions
Incorrect Measurement ID Copied from an example Verify ID in GA4 settings
Inflated metrics Bots not filtered Set up bot filtering in Metrica and GA4
Transactions not transmitted Data Layer not initialized Override dataLayer.push() on cart and order pages
Guarantees and Experience We have configured analytics on over 200 projects, 70% of which are online stores on Bitrix with integration of 1C and payment systems. We use the official documentation at dev.1c-bitrix.ru. We guarantee correct counter operation on all pages and conversion events.

Errors in counters lead to incorrect business decisions: you waste budget on ineffective channels, you don't see real customer drop-off points. Our guarantee—data you can trust.

Get a consultation on your project. Contact us—we'll tell you which metrics are critical for your business and how to set them up without data loss.