Telegram and MAX Mini Apps Can Be Tracked with Yandex Metrica
A Habr guide explains how to set up Yandex Metrica for Telegram and MAX mini apps to track screen transitions, user actions, and traffic sources.
On November 23, 2026, Habr published a guide to setting up Yandex Metrica for mini apps in Telegram and MAX. The author explains how to collect data on the user journey from launch to enquiry or purchase and compare traffic sources. Installing a tracking tag is not enough: the app must explicitly send screen views, actions, and source information.
How to track the journey between screens
A mini app opens in a messenger’s in-app browser and usually works as a single-page application (SPA). Moving from the catalog to a product page or cart does not load a new HTML document. The tracking tag records the app opening, but without manually sent pageviews, it cannot show subsequent transitions. This is the same aspect of SPA navigation that matters when measuring user experience.
In the setup described, the automatic first pageview is disabled with defer: true. The app reads the launch parameter first, then sends a pageview using hit, now including source information. Subsequent hit calls record transitions between important screens. This makes the catalog, product page, and cart separate virtual pages in reports.
Screens and actions are measured differently. Opening the cart is a pageview; adding a product or submitting an enquiry is an event sent to a JavaScript goal via reachGoal. The goal must first be created in the tracking tag’s settings. If every click is treated as a pageview, visit depth will rise and the bounce rate will fall without reflecting the user’s actual route. Re-rendering the same screen should not send another hit either.
For a store, ecommerce tracking can be added alongside goals. It sends data on products, quantities, prices, and purchases. This makes it possible to analyze order contents, cart activity, average order value, and revenue. If the mini app is for booking a service or submitting a simple enquiry, the author suggests sticking to standard goals.
What this gives the business and the team
Parameters in links to the mini app help distinguish launch sources: a Telegram post, an ad in MAX, or a partner referral. The app reads the start parameter before the first pageview and passes the source information to Metrica. The author recommends storing it in two places: the first pageview’s referer and event parameters. The former helps reconstruct how the user launched the app; the latter helps compare actions by users from different sources.
Product owners and marketers can look beyond launch counts to see progress toward a result: how many users reached the catalog, checkout, enquiry form, or purchase. This makes it easier to compare traffic sources by conversion rather than just app entries. If ecommerce tracking is enabled, the author recommends reconciling reported revenue with the backend or CRM.
Before implementing tracking, developers should make a short map of key screens and actions with consistent names. The interface may change, but old and new data need to remain comparable. There is no need to record every interaction: the map should include points that show where users continued and where they stopped.
There are limitations, too. A start parameter helps identify the source, but it is not suitable for authentication: messenger initialization data must be verified on the server according to the platform’s rules. Names, phone numbers, messages, and other personal data should not be sent to Metrica. Ecommerce tracking needs stable product IDs and a unique purchase ID; otherwise, sending an event twice can duplicate revenue.
Before launching ads, the setup is worth checking through the entire journey: the tracking tag initializes once, the first pageview is sent after the parameter is read, each important screen generates one hit, and goals do not fire twice. For debugging, the author suggests opening the web version of the app with _ym_debug=2 and checking the data sent. Then the same journey needs to be tested on iOS and Android: desktop Chrome is no substitute for testing in messengers’ in-app browsers.
My take: test the whole journey
I like the idea of writing down the main screens and actions before adding events to the code. For a small mini app, that map seems clearer than trying to measure everything. I would start with the launch, a key transition, and an enquiry, then check for extra pageviews.
I would not skip testing on a phone, either. When I work on my portfolio, an old phone quickly exposes problems with width and readability. The checks here are different, but the principle feels similar to me: follow the journey in the environment where someone will actually open the app.
Sources
Where the news comes from. The text is a retelling in the author’s own words; the facts come from the source, the opinion is the author’s.
aspiring front-end developer
I’m learning to build responsive pages and gradually getting familiar with CMSs. Right now, I’m putting together a small portfolio site and testing it on an old phone.
All posts by the authorRelated articles
CrUX Adds Experimental Core Web Vitals for SPA Navigations
CrUX now has experimental LCP, INP, and CLS metrics that account for navigation within single-page applications. Site owners can compare them with the stable metrics in CrUX Vis.
ChatGPT Ads Tests New Ad Formats and Updates Measurement Tools
OpenAI is testing larger images and cards in ChatGPT Ads, has updated the Conversions page, and has launched weekly emails with ad performance results.
Attackers Used DebugBear’s DNS to Replace a Website Monitoring Script
After an attack on DebugBear’s infrastructure, attackers replaced its Real User Monitoring script. Site owners using it to track Core Web Vitals are advised to remove the tag and check accounts.
Discussion 1
Lena Vogt
One detail worth adding is session attribution: persist the launch parameters before the first screen transition, then attach them to the eventual enquiry or purchase. Otherwise, later events may be tracked correctly while the source comparison still loses the context that brought the user into the mini app.