---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.6
alternate:
  - https://yandex.com/support/metrica/en/code/separate-code-file.md
  - https://yandex.com/support/metrica/es/code/separate-code-file.md
  - https://yandex.com/support/metrica/pt/code/separate-code-file.md
  - https://yandex.com/support/metrica/ru/code/separate-code-file.md
  - https://yandex.com/support/metrica/tr/code/separate-code-file.md
  - https://yandex.com/support/metrica/zh/code/separate-code-file.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/support/metrica/tr/llms.txt

# Ayrı bir dosyada sayaç kodu


{% note alert %}

Sayaç kodunuz, sunucunuzdaki ayrı bir dosyaya yüklenirse Yandex Metrica'da kodun güncellenmesi durumunda geçersiz hale gelebilir. Bu nedenle, sayaç kodunu siteye [standart yöntemle](https://yandex.com/support/metrica/tr/quick-start.md) kurmanız önerilir.

{% endnote %}


Yandex Metrica sayacını sitenizde ayrı bir dosya olarak çalıştırmak için şu adımları izleyin:

1. Sitenin tüm sayfalarının HTML kodlarına bir satır ekleyin:
    
    ```javascript
    
    ```
    
1. Sayacın, JavaScript'i devre dışı olan ziyaretçiler hakkında bilgi toplayabilmesi için site sayfalarının HTML koduna `noscript` öğesinin içeriğini ekleyin:
    
    ```
    <noscript><div><img src="https://mc.yandex.ru/watch/XXXXXX" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
    ```
    
1. Yandex Metrica arayüzünde [sayaç ekleyin](https://metrica.yandex.com/add).
1. **Sayaç** sekmesine geçin ve ilgili alandan `script` öğesinin içeriğini kopyalayın.
    
1. Elde ettiğiniz kodu `metrika.js` dosyasının içine ekleyin.
    
    {% cut "Dosya içeriğinin bir örneği" %}
    
    ```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();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(XXXXXXXX, "init", {
    id:XXXXXX,
    clickmap:true,
    trackLinks:true,
    accurateTrackBounce:true
    });
    ```
    
    Burada `XXXXXXXX` Yandex Metrica sayaç numarasıdır.
    
    {% endcut %}
    
<!-- source: tr/_includes/buttons/chat-button.md -->
[Sohbete yaz](https://yandex.com.tr/chat/#/user/036e6a02-3620-9cdc-4c5e-a34667a7379e?utm_source=spravka){.button}

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

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

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

{% cut "E-posta yaz" %}

 <!-- source: tr/_includes/popup/id-qanda/check1.md -->
 [Sayacın çalışma kontrolünü](https://yandex.com/support/metrica/tr/general/check-counter.md) kendiniz yapamadıysanız lütfen aşağıdaki önerilerden yararlanın.
 <!-- endsource: tr/_includes/popup/id-qanda/check1.md -->

 {% list tabs radio %}

 - Konsoldaki veriler gönderilmez

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

   {% cut "Öneriler işe yaramadı" %}
      
            
      <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 %}

 - Konsolda veriler mevcut fakat raporlar görüntülenmiyor

    <!-- source: tr/_includes/popup/id-qanda/check2-3.md -->
    Bu durum, bilginin Yandex Metrica'ya gönderildiği anlamına gelir. Bu durumda, veriler aşağıdaki nedenlerden dolayı raporlarda görüntülenmeyebilir:
    <!-- endsource: tr/_includes/popup/id-qanda/check2-3.md -->

    <!-- source: tr/_includes/popup/id-qanda/check2-4.md -->
    - Veriler, farklı bir numara ile sayaca gönderiliyordur.
    - Sayaç ayarlarında, **Filtreler** sekmesinde çok katı filtreler bulunmaktadır. Gereksiz filtreleri kaldırın.
    - Sayaç ayarlarında, **Filtreler** sekmesinde, **Ziyaretlerimi dikkate alma** filtresi aktiftir. Bu, sayacın ziyaretlerinizi hesaba katmadığı anlamına gelir; “Incognito (gizli)” modunda siteyi ziyaret etmeyi deneyin.
    <!-- endsource: tr/_includes/popup/id-qanda/check2-4.md --> 

   {% cut "Öneriler işe yaramadı" %}

           
      <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: tr/_includes/styles/cut-button.md -->

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


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

<div class="borderless-table">

#|
||
Faydalı bağlantılar

- [Demo sayacı](https://metrica.yandex.com/r/dashboard?)
- [Sayaç ekle](https://metrica.yandex.com/add/)
- [Ücretsiz sayaç ayarları](https://yandex.com/promo/freeservice/metrica?utm_source=help_metrica_en&utm_medium=cpc&utm_campaign=1)
- [Yandex Metrica API'si](https://tech.yandex.com/metrika/)
- [Fikir öner](https://yandex.com/support/metrica/troubleshooting/idea.html)
- [Telegram sohbeti](https://t.me/yandexmetrika)
|
Çevrimiçi eğitim

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


- [Eğitim kursuna katıl](https://yandex.com/adv/edu/online/metrika?utm_source=metrika_help&utm_medium=web&utm_campaign=static&utm_content=useful_links)

||
|#

</div>

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

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

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

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

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

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

{% included (../_includes/popup/id-qanda/check2-2.md) %}
   Bu, şu birkaç nedenden dolayı olabilir:
   - Sayaç yanlış ayarlanmıştır. Örneğin, CMS'in sayaç kodunda değişiklikler yaptığı durumda. Sayacı yeniden yüklemeniz veya CMS destek ekibinizle iletişime geçmeniz gerekir.
   - Sitedeki Yandex Metrica sayacı hatalı çalışan komut dosyaları tarafından engelleniyor. Bu tespit, tarayıcı konsolu yardımıyla doğrulanabilir.


{% endincluded %}