CompanyJobsFor developersFor advertisersEvents
Log in
Menu
Main
Training & Certification
Online Course: Yandex.Metrica: basics
Lesson 4: Installing the tag code on your website
 

Lesson 4: Installing the tag code on your website

←Previous lesson
All lessons
Next lesson→
Lesson contents:
How do I install a tag?
Where do I insert the code?
What should I keep in mind?
Practice task
Questions
Now you know the basic concepts of web analytics and how Yandex.Metrica works. To start analyzing your website’s performance, create a Yandex.Metrica tag and install the tag code on all your website pages. In this lesson, we’ll show you how to do it.
How do I install a tag?

You have created a tag. Now add its code to all the pages of your website. The code is in the settings: click the gear icon.

Go to the Tag tab and scroll down to the bottom of the page.

Where do I insert the code?

If you run a CMS-based website, insert the tag code into the file used to generate the header of all your pages. In this case, the code is also inserted after the opening <head> or <body> tag.

If you have a popular CMS, you can use an official Yandex.Metrica plugin to install the tag code automatically. Usually, all you need to do is install the plugin and log in.

You can browse through our catalog to select a plugin for your CMS.

* A CMS is a Content Management System running your website. With a CMS anyone can upload texts, images, or videos to their websites (or remove them). CMS requires no programming skills to do this.

If the website is small and all its pages are individual files coded manually, place the code within the tags or each such file.

The higher you place the code in the text, the faster it loads and sends the pageview data. Even if the user closes the page almost immediately, the pageview is likely to be counted.

What should I keep in mind?
  1. Often a website uses multiple Content Management Systems. For example, one CMS maintains the website content while the other one runs the forum. Make sure to place the code in each CMS.
  2. Add the code to all pages of your website without any exception. If the code is missing from some pages, the user occasionally appears or disappears from Yandex.Metrica, and your statistics get distorted.
  3. If you change the settings for your Yandex.Metrica tag code, update the code on your website.

If users visit your website regularly, you can see your initial statistics almost immediately after you install the code. Usually the data makes its way to the reports within three minutes.

Practice task
Create a Yandex.Metrica tag and install it on your website.
Do the task
Questions
After you change the tag code settings in Yandex.Metrica:
Correct!
No, that’s incorrect. After you change the tag code parameters in the Yandex.Metrica interface, you need to re-install the tag code on all your website pages.
Do you need to change the initial tag settings if you plan to use Session Replay?
Correct!
No, that’s incorrect. To use Session Replay, on the Tag tab select “Session Replay, scroll map, form analytics” under Settings.
←Previous lesson
All lessons
Next lesson→

Subscribe to the Yandex Ad Tech Newsletter

 Incorrect email address
 
Conditions
I hereby agree to receive advertising messages from LLC “YANDEX”, its affiliates or any other entities / persons acting on behalf of LLC “YANDEX”, in accordance with Part 1, Article 18 of the Federal Law “On Advertising” (SRN: 1027700229193) and to decline at any time receiving such messages by using the functionality of the service, as part of which or in connection with which I have received these advertising messages.
Thank you!

Please check your inbox.

Services

Yandex.Direct
Yandex.Market
Yandex.Metrica
AppMetrica
Yandex.Webmaster
Yandex.Audience
Yandex.Directory
Yandex.Tracker

Yandex advertising products

Search advertising
Yandex Advertising Network
Mobile Advertising
Display Advertising
Video advertising
Retargeting
Yandex.Direct automatic strategies
Audio advertising
Location-based advertising
Other Yandex services

Technologies

Direct API
Metrica API
AppMetrica
Market API
Money payment processing

Training & Certification

Training & Certification
Online Course
Certification of specialists

For Partners

For Agencies
Yandex partner status
Ad Network
ADFOX

Contacts

Yandex support service
Offices
Local advertising agencies
Get professional help with setting up Yandex.Direct

Legal Documents

Privacy Policy
Interest-based advertising on Yandex.Direct

Requirements

Technical Requirements
General Terms and Conditions
Regulations for Placing Advertisements

Advertising rates

Price List
© 2004–2025  YANDEX LLC