Installing multiple tags on a site

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

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

<!-- Yandex.Metrica 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" style="..." alt="" />
    <img src="https://mc.yandex.ru/watch/YYYYYY" style="..." alt="" />
  </div>
</noscript>
<!-- /Yandex.Metriсa counter -->

Here, XXXXXX and YYYYYY are the IDs of the Yandex Metrica tags.

Chat with us

Write an email

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 tag code. 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.
The recommendations did not help

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.
The recommendations did not help