Web Analytics: GA4, GTM, Yandex.Metrica, Amplitude
Conversion is 1.2%. Traffic is growing, conversion is stalled. A marketer looks at Google Analytics and says: "We see that users are leaving at step 2 of the checkout process". A developer opens the same step and sees no errors. In Sentry — silence. So it's not a JavaScript error, but rather a UX issue or the data that Analytics is showing incorrectly.
Analytics breaks invisibly. An event stops being tracked after a redeployment — no one notices. A GTM tag fires twice — data is duplicated. A GA4 filter excludes a bot that is actually real traffic from a corporate proxy.
GA4: events, parameters, and what really needs to be configured
Universal Analytics died in 2023. GA4 is an event-driven model: there are no fixed page hits and transactions, there are events with parameters. This is more flexible, but requires proper event design.
Automatic events GA4 collects on its own: page_view, scroll, click, session_start. This is a basic level — requires no configuration.
Recommended events must be implemented independently: purchase, add_to_cart, begin_checkout, view_item. Google expects a specific parameter schema — if you pass product_id instead of item_id, data goes into GA4, but not into standard e-commerce reports.
Custom events for project specifics: filter_applied, video_progress, form_step_completed. Custom parameters must be registered in GA4 Admin → Custom definitions, otherwise they won't be available in reports.
Common mistake: purchase event with duplicates. Reason: the tag fires on the /thank-you page, the user refreshes the page — a second purchase goes to GA4. Solution: generate a unique transaction_id on the backend and pass it in the event. GA4 de-duplicates by it (in theory — verify in practice through DebugView).
Google Tag Manager: tag architecture
GTM is a tool for managing tags without code deployment. But "without code" doesn't mean "without architecture".
Data Layer — the foundation of everything. We transmit data from the application to GTM via dataLayer.push(). Structure: event + contextual data. For e-commerce: before opening a product page — push with product data. GTM tag reads from dataLayer, not from DOM.
window.dataLayer = window.dataLayer || [];
dataLayer.push({
event: 'view_item',
ecommerce: {
items: [{
item_id: 'SKU-12345',
item_name: 'Product Name',
price: 1990.00,
currency: 'RUB'
}]
}
});
Bad practice: GTM tag parses DOM — looks for price in span.price, name in h1. This breaks with any markup change. Good practice: always dataLayer.
Preview Mode for debugging, GTM Server-Side for sensitive data (sending from server, not from browser — bypasses ad blockers, doesn't lose data).
Yandex.Metrica: Webvisor and Goals
For Russian-speaking audiences, Metrica is mandatory — especially Webvisor. Watching a recording of a user session who abandoned their cart — often gives an answer faster than a week of funnel analysis.
Goals in Metrica: event-based (via ym(COUNTER_ID, 'reachGoal', 'GOAL_NAME')) or automatic (button click, page visit). Integration with CRM via Metrica Plus — offline conversion tracking.
Segments and cohort analysis. Metrica allows segmenting users by traffic source, device, geolocation and viewing the behavior of each segment separately.
Amplitude: product analytics
GA4 and Metrica are marketing tools. Amplitude is product-focused. The difference: Amplitude is designed for analyzing user behavior within the product: funnels, retention, user paths.
When Amplitude is needed: SaaS product, mobile application, any product with registered users where it's important to understand how users go through onboarding, at which step they leave, which features they use more.
Key concepts: identify (link anonymous user to userId after authorization), group (account in B2B SaaS), cohorts for retention. Amplitude Chart — funnel of steps over the last 30 days with breakdown by source.
Data Quality Monitoring
Analytics without monitoring is a black box. We configure:
- GA4 Realtime — check after each deployment that key events are coming through
-
Alerting in GA4 — anomaly in the number of
purchaseevents (sharp drop = something is broken) - GTM Preview in staging environment before production
- Manual tests of funnels once a week — just go through the purchase path and verify everything is being tracked
Process and Timeline
Current tag and data audit → event schema design → Data Layer development → GTM tag configuration → QA in Preview Mode → deployment → report and dashboard setup.
| Scenario | Timeline |
|---|---|
| Basic GA4 + GTM setup | 1 week |
| Full e-commerce tracking + Metrica | 2–3 weeks |
| Server-side GTM + Amplitude | 3–5 weeks |
Cost is calculated individually.







