Installing multiple tags on a site

Sometimes you may need to put multiple tags on a page at once. Similarly, you can put the image insertion code that is used when JavaScript is disabled inside a single noscript element.

If you are installing multiple tags, enable Session Replay for only one tag that is specified in the code, regardless of the Session Replay version.

<!-- Yandex Metrika counter -->
<script type="text/javascript" >
   (function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
   m[i].l=1*new Date();
   for (var j = 0; j < document.scripts.length; j++) {if (document.scripts[j].src === r) { return; }}
   k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})
   (window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");

ym(XXXXXX, "init", {clickmap:true, trackLinks:true, accurateTrackBounce:true});
ym(YYYYYY, "init", {clickmap:true, trackLinks:true, accurateTrackBounce:true, webvisor: true});

</script>
<noscript>
  <div>
    <img src="https://mc.yandex.ru/watch/XXXXXX?ut=noindex" style="..." alt="" />
    <img src="https://mc.yandex.ru/watch/YYYYYY?ut=noindex" style="..." alt="" />
  </div>
</noscript>
<!-- /Yandex Metrika counter -->

Here XXXXXX and YYYYYY are the numbers of Yandex Metrica tags.

If you were unable to independently check the tag, follow the recommendations below.

This might happen for the following reasons:

  • The tag is installed incorrectly. For example, the CMS modified the code snippet. Reinstall the tag or contact the support service for your CMS.
  • Broken scripts are preventing the Yandex Metrica tag from working on the site. You can check this in the browser console.

This means that information is being transmitted to Yandex Metrica. However, the data might not be shown in reports for any of the following reasons:

  • Data is sent to a tag with a different number.
  • The Filters tab in the tag settings has overly strict filters defined. Remove unneeded filters.
  • The Filters tab in the tag settings has the Don't count my sessions filter enabled. This means that the tag doesn't register your own sessions. Try accessing the site with your browser in “incognito” mode.