Cookie Banner for Bitrix (1C-Bitrix)
Last updated: September 9, 2026
1C-Bitrix sites usually either have no cookie banner at all, or a static "We use cookies" line with no checkboxes and no actual blocking — Bitrix has no built-in consent-management mechanism of its own. Below are two working ways to add a real banner that gates Yandex Metrica, ad pixels, and other trackers behind consent.
Option 1: via the site template (most reliable)
If you have file access (FTP or the admin panel's built-in editor), open header.php for the active template — /local/templates/your_template/header.php (or /bitrix/templates/... if the template isn't moved to local) — and add the tag right before the closing </head>, ahead of any analytics snippets:
<script src="https://api.cookiestack.dev/widget.js" data-api-key="YOUR_API_KEY" async ></script>
This works the same way across "Site Management", on-premise Bitrix24, and custom templates — the code applies to every page using that template.
Option 2: through the admin panel, no file edits
If template edits aren't an option, check Settings → Product Settings → Developer Tools — some editions expose a free-form HTML field that Bitrix injects into every page before </head>. The exact location varies by edition and installed modules — if it's not there, use Option 1 or ask whoever maintains the site.
Gating trackers behind consent
A Yandex Metrica counter added via Bitrix's "Web Analytics" module (Settings → Web Analytics → Counters) runs independently of any cookie banner. The simplest fix is to disable it there and enable the Yandex Metrica integration in your Cookiestack domain settings instead — the widget initializes the counter itself, only after the visitor consents to "Statistics".
For any other manually embedded scripts (lead-capture widgets, callback widgets, ad pixels), add type="text/plain" and data-cookie-category="marketing" (or statistics / preferences) — Cookiestack activates them automatically once the visitor consents to that category. See the JavaScript API for details.
For how a builder's built-in cookie notice differs from a real CMP, see Cookiestack vs a builder's built-in banner.
This article is for informational purposes only and is not legal advice. Admin panel layout varies by Bitrix edition and installed modules.