Features
← All features
Sales and marketing

Analytics and cookie consent

Google, Meta and TikTok counters with purchase events and a cookie consent window.

Screenshots are coming soon.

A counter that only measures visits never answers the main question: which ads brought the money. This plugin connects your shop to Google Analytics 4, Google Tag Manager, Meta Pixel and TikTok Pixel and reports the whole shopping path — from a product view to a paid order. You paste the codes in the settings; no manual template editing. A cookie consent window comes with it: no counter starts before the shopper answers.

What it does

  • Connects four systems: Google Analytics 4, Google Tag Manager, Meta Pixel (Facebook and Instagram) and TikTok Pixel. Codes are set separately for every storefront — each domain has its own.
  • Reports the shopping path: viewed a product, added it to the cart, removed it, opened the cart, started checkout, paid for an order, searched the shop. Your reports then show revenue and which ads produced it.
  • Sends the purchase with the full contents: order number, total, shipping, tax, items with prices and quantities. Prices come from the order itself, so reports match what was actually bought.
  • Sends an order once: refreshing the thank-you page does not double your revenue.
  • Asks for cookie consent in one of three ways: ask first and collect nothing until answered, collect right away and allow opting out, or do not ask at all.
  • Lets the shopper choose what to allow: statistics and advertising separately. Essential cookies cannot be switched off — the cart and sign-in need them.
  • Passes the shopper's choice to Google in its own consent format, so your advertising respects a refusal instead of ignoring it.
  • Links to your policy page: pick an existing shop page and the link appears in the window.
  • Remembers the answer for a period you set, then asks again.
  • Shows the events being sent in the browser console while you check the setup.

What you need

  • Counter codes from your accounts: Google Analytics, Tag Manager, Meta or TikTok. Any single one is enough — empty fields simply stay disconnected.
  • Nothing to paste into your design: the plugin works in any shop theme. The consent window's look is edited in the design editor, and a button in the settings restores the original.

What appears in the shop

This is what a shopper sees once it is installed.

  • The counter code and the consent rule are added to every shop page — shoppers never see them. The design is untouched and there is nothing to edit in the design editor. The counter codes are set separately for each storefront in the plugin settings.
  • A cookie consent window appears at the bottom of the page with «Accept all», «Essential only» and per-category settings. The window's look and wording are changed in the design editor, the link to your policy page — in the plugin settings. The window can be switched off if you do not need consent.
  • On the cart page the cart contents are sent to the counters, so you can see where shoppers drop off. Nothing visible is added to the page. This can be switched off with the «Report purchases» setting.
  • At checkout the counters receive the checkout start with the cart contents and total. Nothing visible is added to the page. This can be switched off with the «Report purchases» setting.
  • On a product page the counters receive a product view: name, code and price. Nothing visible is added to the page. This can be switched off with the «Report purchases» setting.
  • A Tag Manager fallback frame is added at the top of the page for browsers with JavaScript switched off. Shoppers never see it. While consent is being asked the frame is not added: without JavaScript there is no way to answer, yet the counter would already load.
  • On the thank-you page the purchase is sent to the counters: order number, total, shipping and items. Nothing visible is added to the page. The order is sent once — refreshing the page will not send it again.

Аналитика и согласие на cookie

Подключает к магазину Google Analytics 4, Google Tag Manager, Meta Pixel и TikTok Pixel и рассказывает им о покупательском пути. Вместе со счётчиками приходит окно согласия на cookie: до ответа покупателя ни один счётчик не запускается.

Что настраивается

Настройки живут в «Плагины → Аналитика и согласие на cookie», отдельно у каждой витрины: свои коды счётчиков, своё правило согласия.

  • Счётчики. Идентификаторы GA4 (G-…), Tag Manager (GTM-…), Meta Pixel (числовой), TikTok Pixel. Пустое поле — счётчик не подключается.
  • Сообщать о покупках. Просмотр товара, корзина, начало оформления, оплаченный заказ, поисковые запросы. Выключено — остаётся только посещаемость.
  • Согласие на cookie. Три правила: спрашивать и до ответа ничего не собирать (строгий, для Европы), собирать сразу с возможностью отказаться, не спрашивать вовсе. Отдельно — какие категории покупатель может выбрать, ссылка на страницу с политикой и срок памяти выбора.
  • События в консоли браузера — на время проверки настройки.

Что появляется на витрине

Слот темы Что добавляется
storefront.head настройки для браузера и загрузчик счётчиков (невидим)
storefront.body.start запасной кадр Tag Manager — только когда согласие не спрашивается
storefront.body.end окно согласия на cookie
product.buybox.end событие «посмотрел товар»
cart.body, checkout.body состав корзины и начало оформления
checkout.success.after покупка: номер заказа, сумма, доставка, состав

Разметка окна согласия — шаблон темы templates/plugins/analytics/consent.html, оформление — assets/plugins/analytics/consent.css. Оба файла кладутся в тему при первом показе и правятся в редакторе оформления; кнопка «Вернуть заводской вид окна» в настройках возвращает исходный.

Как это устроено

Счётчики грузит public/analytics.js, а не разметка страницы: до ответа покупателя грузить их нельзя, а после ответа страница не перезагружается — значит решение принимается в браузере. События, отправленные страницей раньше, копятся в очереди и уходят, как только счётчики подняты.

Google получает выбор покупателя в своём формате согласия (Consent Mode): рекламные хранилища отдельно от статистики, значение по умолчанию — запрещено.

«Положил в корзину» и «убрал из корзины» ловятся по самим запросам корзины, а не по разметке темы: адреса корзины принадлежат магазину, поэтому события работают в любой теме, включая сторонние.

Покупка отправляется один раз: номера отправленных заказов магазин помнит в браузере, поэтому обновление страницы «спасибо» не задваивает выручку в отчётах.

1.0.3 03.08.2026

Storefront changes show up immediately

A shopper's browser no longer serves the old version of your shop files after an update.

1.0.2 03.08.2026

«Removed from cart» reaches the counters

The event is sent at the moment of the action instead of after a page reload — previously it was lost.

1.0.1 03.08.2026

The cart is counted in any theme

Cart events are captured from the shop's own requests, so the counters work in third-party themes too.

1.0.0 03.08.2026

Analytics and cookie consent

Google Analytics, Tag Manager, Meta and TikTok — each storefront has its own codes. Product views, cart, checkout start and purchases with their contents are all counted. A consent window asks permission and passes the choice to the counters.