---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.6
alternate:
  - https://yandex.com.tr/support/metrica/en/code/install-several-counters.md
  - https://yandex.com.tr/support/metrica/es/code/install-several-counters.md
  - https://yandex.com.tr/support/metrica/pt/code/install-several-counters.md
  - https://yandex.com.tr/support/metrica/ru/code/install-several-counters.md
  - https://yandex.com.tr/support/metrica/tr/code/install-several-counters.md
title: Installing multiple tags on a site
description: How to install multiple tags on a site.
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com.tr/support/metrica/en/llms.txt


# 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're installing multiple tags, only connect Session Replay to one tag specified in the code.

To initialize a tag, use the `ssr` parameter.

```javascript
<!-- Yandex Metrica tag -->

<noscript>
  <div>
    <img src="https://mc.yandex.ru/watch/XXXXXXX" style="..." alt="" />
  </div>
  <div>
    <img src="https://mc.yandex.ru/watch/YYYYYYY" style="..." alt="" />
  </div>
</noscript>
<!-- /Yandex.Metrika counter -->
```
Here, `XXXXXXXX` and `YYYYYY` are the IDs of the Yandex Metrica tags.

{% cut "Code snippet without the `ssr` parameter" %}

```javascript
<!-- Yandex Metrica tag -->

<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.Metrika counter -->
```

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

{% endcut %}

{% cut "Combining tags with different code versions" %}

If multiple tags are installed on a page, and one of them loads with the `ssr: true` parameter, some combinations of settings might cause Session Replay issues.

Imagine there are two tags set up on the same page:
*   Tag `XXXXXXXX` is installed with the `ssr: true` parameter. Session Replay is disabled in this tag's settings.
*   Tag `YYYYYY` is installed in a standard way and uses deferred loading, such as with the `setTimeout` function. Session Replay is enabled in this tag's settings.

In this case, Session Replay won't work on both tags due to a specific code loading process: 
1. The code of the first tag is generated on the server (as determined by the `ssr: true` parameter). Here, the settings in the Yandex Metrica interface determine if Session Replay is loaded or not. 
2. Session Replay is disabled in the Yandex Metrica settings, so the loaded tag file `tag.js` doesn't contain the Session Replay module.
3. The second tag is loaded after the first one. If its initialization code lacks the `ssr: true` parameter, it loads the same `tag.js` file that was generated for the first tag.
4. As a result, `tag.js` doesn't contain the Session Replay code and Session Replay can't operate.

To ensure that Session Replay operates properly on tag `YYYYYY`:

1.  Enable Session Replay in the `XXXXXXXX` tag settings.
2.  Add the `webvisor: false` parameter to the initialization code of tag `XXXXXXXX`.

In this case, `tag.js` will contain the Session Replay code, but the `webvisor: false` parameter will prevent Session Replay from operating on the first tag.

Sample code for tag `XXXXXXXX`:

```javascript
ym(XXXXXXXX, "init", {
    ssr: true,
    webvisor: false,
    // other parameters
});
```

{% endcut %}


<!-- source: en/_includes/buttons/chat-button.md -->
[Chat with us](https://yandex.com.tr/chat/#/user/036e6a02-3620-9cdc-4c5e-a34667a7379e?utm_source=spravka){.button}

<!-- source: en/_includes/styles/href-to-button.md -->

<!-- endsource: en/_includes/styles/href-to-button.md -->
<!-- endsource: en/_includes/buttons/chat-button.md -->

<!-- source: en/_includes/code/texing-button.md -->
<div class="cut-button">

{% cut "Write an email" %}

<!-- source: en/_includes/popup/id-qanda/check1.md -->
If you were unable to [independently check the tag](https://yandex.com.tr/support/metrica/en/general/check-counter.md), follow the recommendations below.
<!-- endsource: en/_includes/popup/id-qanda/check1.md -->

{% list tabs radio %}

- Data is not sent to the console

  {% include [qanda-check2-2](../_includes/popup/id-qanda/check2-2.md) %}

  {% cut "The recommendations did not help" %}


  <div style="padding: 15px;
         margin: 10px 0;
         background: #FFFFFF;
         border-radius: 10px;
         border: 1px solid var(--g-color-line-generic);">
    <iframe style="background: #FFFFFF;"
            height="700"
            width="100%"
            frameborder="0"
            src="https://forms.yandex.com.tr/surveys/1706/?&theme=Dannye v konsoli ne otpravlyayutsya&iframe=1&lang=tr">
    </iframe>
  </div>

  {% endcut %}

- There is data in the console, but the reports do not appear

  <!-- source: en/_includes/popup/id-qanda/check2-3.md -->
  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:
  <!-- endsource: en/_includes/popup/id-qanda/check2-3.md -->

  <!-- source: en/_includes/popup/id-qanda/check2-4.md -->
  - 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.
  <!-- endsource: en/_includes/popup/id-qanda/check2-4.md --> 

  {% cut "The recommendations did not help" %}


  <div style="padding: 15px;
           margin: 10px 0;
           background: #FFFFFF;
           border-radius: 10px;
           border: 1px solid var(--g-color-line-generic);">
    <iframe style="background: #FFFFFF;"
              height="700"
              width="100%"
              frameborder="0"
              src="https://forms.yandex.com.tr/surveys/1706/?&theme=Dannye v konsoli est, no otchety ne otobrazhayutsya&iframe=1&lang=tr">
    </iframe>
  </div>

  {% endcut %}

{% endlist %}

{% endcut %}

</div>

<!-- source: en/_includes/styles/cut-button.md -->

<!-- endsource: en/_includes/styles/cut-button.md -->
<!-- endsource: en/_includes/code/texing-button.md -->


<!-- source: en/_includes/footer-links.md -->
- - -

<div class="borderless-table">

#|
||
Useful links

- [Demo tag](https://metrica.yandex.com.tr/r/dashboard?)
- [Add a tag](https://metrica.yandex.com.tr/add/)
- [Free tag setup](https://yandex.com.tr/promo/freeservice/metrica?utm_source=help_metrica_tr&utm_medium=cpc&utm_campaign=1)
- [Yandex Metrica API](https://tech.yandex.com.tr/metrika/)
- [Suggest your idea](https://yandex.com.tr/support/metrica/troubleshooting/idea.html)
- [Discuss in Telegram](https://t.me/yandexmetrika)
|
Online training

- [Get a Yandex Metrica certificate](https://yandex.ru/adv/expert/exam/metrika/?utm_source=metrika_help&utm_medium=web&utm_campaign=static&utm_content=useful_links)


- [Take a training course](https://yandex.com/adv/edu/online/metrika?utm_source=metrika_help&utm_medium=web&utm_campaign=static&utm_content=useful_links)

||
|#

</div>

<!-- source: en/_includes/styles/table-style.md -->

<!-- endsource: en/_includes/styles/table-style.md -->
<!-- endsource: en/_includes/footer-links.md -->

<!-- source: en/_includes/styles/cut-button.md -->

<!-- endsource: en/_includes/styles/cut-button.md -->

<!-- source: en/_includes/styles/href-to-button.md -->

<!-- endsource: en/_includes/styles/href-to-button.md -->

{% included (../_includes/popup/id-qanda/check2-2.md) %}
   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.


{% endincluded %}