We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11031
    • 11 Posts
    Adds a Yandex.Metrika tag to every HTML page of your website.


    English

    Installation

    Create a new plugin, and paste the contents of this file into the Plugin Code area. Set the plugin name to "Yandex.Metrika" and description to "1.0 Adds Yandex.Metrika code to every page in your site"
    Copy this line into the Plugin Configuration of the Configuration tab:

    &account=Account ID;string;000000 &testMode=Test Mode;list;true,false;false &clickmap=Click Map;list;true,false;true &tracklinks=External Links;list;true,false;true &async=Async Mode;list;true,false;true


    Enter your Yandex Account details on the configuration tab
    Check the OnWebPagePrerender box on the System Events tab
    Press Save
    Ensure "Stats Tracking" is enabled in the Site Configuration menu (Tools -> Configuration -> [ Site ] tab )

    Usage

    Once installed, you don’t need to do anything else - all HTML pages which have the "Enable Stats Tracking" box ticked in Manager will automatically have the code inserted.

    Parameters (set in configuration tab)

    account = Yandex.Metrika tracking code, which looks like 123456
    testMode = boolean - if true, do not send tracking data to Yandex. Code is outputted as comments, useful for debugging
    clickmap = boolean - the collection of statistics for the report "Map of clicks"
    tracklinks = boolean - collection of statistics on the links to external resources and download
    filesasync = boolean - does not block or affect the speed of loading pages on your site


    Русский

    Установка

    Создать новый плагин, и скопировать содержимое файла в Код плагина. Установить имя плагина "Яндекс.Метрика" и описание "1.0 Добавляет Яндекс.Метрика на каждую страницу сайта"
    Скопировать следующий код в Конфигурацию плагина:

    &account=Account ID;string;000000 &testMode=Тестовый режим;list;true,false;false &clickmap=Карта кликов;list;true,false;true &tracklinks=Внешние сылки;list;true,false;true &async=Асинхронный код;list;true,false;true


    Ввести свой Account ID
    Поставить галку на пункте OnWebPagePrerender в разделе Template Service Events
    Сохранить
    Удостоверьтесь, что во вкладке Сайт значение radiobutton Регистрировать посещения выставлено в Да (Инструменты -> Конфигурация -> вкладка [Сайт])

    Использование

    После установки больше ничего не требуется. На все страницы где выставлен параметр "Регистрировать посещения" будет добавлен код Яндекс.Метрики

    Параметры (устанавливаются во вкладке плагина Конфигурация)

    Account ID = Account ID который нужно взять с Яндекс.Метрики, должен быть в виде 123456
    Тестовый режим = при использовании данного режима код будет закомментирован и данные не будут отсылаться в Яндекс.Метрика. Используется для отладки
    Карта кликов = сбор статистики для работы отчета «Карта кликов»
    Внешние сылки = сбор статистики по ссылкам на внешние ресурсы и загрузкам файлов
    Асинхронный код = не блокирует и не влияет на скорость загрузки страниц вашего сайта