Configuring a tag
Tag settings are available in the Settings → Tag section.
You can switch between tags using the selector at the top of the page.
Basic tag settings
Tag name
- The specified name is shown on the My tags page and in the upper menu for switching between tags. If not specified, the value of the Site URL field is used here.
Site URL
-
The main domain of a site (without
http://
,https://
, orwww
). This information is required.In this field, you can enter the full
path
to a page in the URL structure. For example,example.com/category/
. Don't specify the URL for a specific file or page section using the “#” symbol: this will cause an error in the input field. Additionally, parameters passed in the URL are ignored (the part of the URL after the "?" symbol).More information about the URL structure
https://<host>/<path>?<params>#<fragment>
<host>
: Site domain.<path>
: Path that can have a hierarchical structure. The structure is indicated using slashes “/”.<params>
: Block of parameters separated from the path by a question mark “?”.<fragment>
: Fragment of page content that is separated from the parameters and the path with a “#”.
Additional addresses
-
You may need to enter additional addresses in the following cases:
- The same site responds from different addresses with the same installed tag.
- You want to get statistics for multiple sites using a single tag.
Clicks between all of the set addresses are interpreted as internal clicks.
In this field, you can enter the site's
path
in the URL structure. For example,example.com/category/
. Don't specify the URL for a specific file or page section using the “#” symbol: this will cause an error in the input field. Additionally, parameters passed in the URL are ignored (the part of the URL after the "?" symbol).If reports show data on page views that don’t belong to your site addresses and you don’t need this data, select Receive data only from specified addresses.
This situation can arise in the following cases:
- Someone initialized a tag with your number on their own site (probably by mistake).
- Your site’s pages were being viewed via a proxy service.
- There is an almost exact copy of your pages on other domains. When copying content, the tag code was also copied.
The Including subdomains option allows you to include subdomains of the main site and additional sites for filtration (
subdomain.example.com
,other.subdomain.example.com
, ...).
Session Replay, scroll map, form analytics
-
This option also enables the click map and link map.
Learn more about Session Replay
Content Analytics
-
Enable this option to receive reports about your website’s text-based content. These reports help you determine which content is more popular and which sources result in higher user engagement.
You can also:
Check tag
You can make sure the tag is placed on the site pages and works correctly. Learn more
Enable the option “Don't save full IP addresses of site users”
Yandex Metrica normally stores the entire depersonalized IP address of the user. If this option is enabled, the system registers an incomplete address. For example, 192.0.2.2 changes to 192.0.2.0. This means that location detection will not be as precise. Learn more
To enable the option, open the Additional data processing conditions section.
Confirm your acceptance of the Yandex Metrica data processing agreement
This is necessary if your company is registered in the EU or Switzerland, or if you are required to comply with the General Data Protection Regulation (GDPR) for other reasons. Learn more
To accept the agreement, open the Additional data processing conditions section.
Additional tag settings
Currency
- Currency according to ISO 4217, which is used by default to display revenue. For example, revenue by goal, ad spending, or in e-commerce data.
Visit timeout in minutes
- This is how long a user is inactive on the site. When the specified number of minutes has passed, the session will be considered ended. The session timeout is specified as an integer between 30 and 360. By default, it is 30 minutes.
Deleting duplicate events
- This option deletes duplicate e-commerce purchase events if they have the same user and purchase amount and ID, even if the events are attributed to different sessions. To enable this option, check the Delete duplicate E-commerce purchase events in different sessions box.
Hash tracking in the address bar
- This option is applied for AJAX sites and allows correct calculation of the number of pageviews on pages that are updated without being refreshed.
For XML sites
- The
noscript
element must not be used in XML documents.
Alternative CDN
- This option allows you to correctly count sessions from regions that have restricted access to Yandex Metrica. It might take longer to load the tag code when using this option. Even with the option enabled, the code snippet can send a preliminary request to
mc.yandex.ru
to save traffic.
Asynchronous code
- The tag code does not block pages and does not affect page loading speed. Displayed if the Outdated tag code option is enabled.
Dispath ecommerce data to Metrica
- This option allows you to connect Ecommerce through the interface. If the option is on, by default the JavaScript array is assigned the name
dataLayer
. You can change it in the Name of data container field.
Informer
-
This tool is used to display site statistics directly on your site. You can customize the appearance of the informer and select its type:
- Basic: Clicking on the informer takes you to Yandex Metrica.
- Advanced: Clicking on the informer shows a widget with site statistics for the week.
It shows the data collected by the tag for the current day (this period is not configurable by the user). Data is collected according to the time zone specified in the tag settings.
If you only install the informer code (
<!-- Yandex Metrica informer -->
) on a site without the code snippet, statistics aren't collected for the site.
Data security and usage
-
You can use the options to configure the parameters for working with data collected by Yandex Metrica.
Get access to market reports
The option allows Yandex Metrica to use aggregated anonymized tag data to build market analytics reports. The collected data helps you understand the state of your business relative to the market.
Restricted mode
This option allows site owners to keep user visits to different site pages secret.
When Restricted mode is enabled, Yandex Metrica uses only first-party cookies (cookies created by the site visited by the user and stored on their device) to collect data on the site’s audience, while third-party cookies and trackers that send user information for the benefit of other resources are not collected.
When this option is enabled, some statistics are unavailable to the site owner, including data on Yandex Direct ad campaigns, cross-device analytics, Session Replay recordings, socio-demographic characteristics of the audience (gender, age, income, location), and robot data.
At the same time, the site owner can still track important site metrics such as traffic and traffic sources.
Use advanced tracking settings
This option is available for HTTPS websites.
This option allows Yandex Metrica to use the contact information entered by the user on the site to enhance advertising algorithms and more accurately analyze user behavior. This helps you increase the effectiveness of ad campaigns and learn more about users’ behavior, even if they use browsers that limit cross-site cookies (third-party cookies), such as Safari and Mozilla Firefox.
If the option is enabled and in the tag settings the creation of automatic goals is enabled, then the goal Autogoal: provided contact information may appear in Yandex.Metrica. A goal is created upon the first entry of contact information on the site, and the data is sent to Yandex Metrica in hashed form. If this option is disabled, Yandex Metrica records the entered data but does not process it.
Save masked data
This option enables Yandex Metrica to store anonymized (masked) contact data that visitors provide on the site. This helps you track user actions more accurately and improve the quality of your analytics and advertising algorithms while complying with data privacy regulations.
Allow vendors to use e-commerce events in their ads
This option enables vendors (brands) optimize their ad campaigns using e-commerce events from your tag for their products: views, add-to-carts, and purchases.
You can use this option to drive sales and get more qualified traffic from vendors' ads that direct to your site, without granting them access to your Yandex Metrica tag.
FAQ about the informer
The informer does not display data
Make sure the informer is enabled. In the Settings section (on the Tag tab), the Informer option must be selected. If this option is disabled, save changes after enabling it and update the tag code on the website pages.
The label “Yandex Metrica” is shown instead of the informer
Check whether the website where you are expecting to see the informer has been added as an additional domain in the tag settings. Without this setting, data is not displayed.
Useful links |
Online training |
Read about this in the blog |