Инструкцию по установке и настройке MiStats можно найти here.
Статистика в админке
В админке Smarty представлен базовый функционал MiStats, а именно — статистика по просмотрам каналов и передач в разделе «Статистика». Этот функционал ранее была реализован с рамках устаревшего модуля ViewStats, работающего на MongoDB, и сохранён в админке ради совместимости.

Статистика смотрения фильмов и сериалов, а также остальной функционал MiStats доступен в отдельной панели администрирования.
Метрики телеканалов
В данном разделе представлен функционал по просмотру статистики для каждого отдельно взятого канала. Функционал удобен для формирования ответа для правообладателя на тему телесмотрения отдельно взятого канала, а также сравнения с остальными каналами в его нише.
Пример готового отчёта по каналу:

Помимо получения численных метрик доступно построение рейтингов с участием данного канала относительно других в различных разрезах, а также график просмотров телеканала в разрезе дней.


Channel ratings
В отдельной вкладке с рейтингом телеканалов доступно построение графиков в разрезе категорий, тарифов и устройств. Данные рейтинги уже более полезны для выявления общих лидеров телесмотрения в сервисе для принятия продуктовых решений оператором: о запуске рекламы, об удалении несмотрибельных каналов из сервиса и других.

Готовый график отображается в админке, а также доступен для выгрузки в csv- и xlsx-файлы.

Television ratings
Функционал аналогичен предыдущему, но строит график уже непосредственно по телесмотрению передач: как в Live, так и в записи.

Результаты также можно выгрузить в табличные файлы.

Television-based selection and sorting
MiStats allows you to automatically create a collection based on the obtained statistics:
Creating smart channel sorting
smarty_manage create_channel_sorting_by_popularity --settings=settings.
When executing this command, a sorting of channels is created based on television viewing statistics, based on the specified parameters in the team.
The necessary parameters to execute this command:
-client_id - a list of customer identifiers, through a comma, for which caching is necessary;
-days_number the number of days during which television viewing should be considered;
- criterion Characteristics by which to evaluate popularity. Possible values:watch - the total viewing time of the channel;watch_sessions by the number of channel inclusions;average the average viewing time of the channel;median_watch_time the median viewing time of the channel.
Additional parameters of the team:-devices - a list of devices for which you should take into account the statistics of tv viewing (system names of devices are transmitted, by default - all);-tariffs - a list of tariffs for which it is worth taking into account the statistics of tv viewing (tariff identifiers are transmitted, by default - all);--accounts_active only take into account statistics from active accounts.
Creating a selection of popular TV channels
smarty_manage create_channel_selection_by_popularity --settings=settings;
Parameters:-client_id This option is mandatory and determines the Client identifier for which the selection will be created.-days_number this parameter is mandatory and determines the number of days during which you should take into account television viewing.- criterion This parameter is mandatory and determines the characteristic on which the selection will be created. Possible values: watch (total channel viewing time), watch_sessions (number of channel viewing sessions), average (average channel viewing time), median_watch_time (median viewing time).-devices parameter for creating a collection for certain devices (by default, the collection is created for all devices).--accounts_active The parameter allows you to create a selection only based on active accounts. Possible values: true, false. By default falsely.-tariffs selection of certain tariffs to create a collection (all tariffs are taken into account by default).--selection_size The parameter determines the size of the set created. In the absence of information about a sufficient number of channels, channels without statistics are added to the desired number. By default 17.
Example of using a command:
Creating for Client=1 a selection of weekly popular channels by viewing time:
smarty_manage create_channel_selection_by_popularity —client_id=1 —days_number=7 —criterion=watch_time —settings=settings.<settings name>
Creating a selection of popular television programs
smarty_manage create_epg_selection_by_popularity --settings=settings.
Parameters:-client_id This option is mandatory and determines the Client identifier for which the selection will be created.-days_number this parameter is mandatory and determines the number of days during which information on transfers is collected.-devices parameter for creating a collection for certain devices (by default, the collection is created for all devices).-tariffs selection of certain tariffs to create a collection (all tariffs are taken into account by default).--selection_size The parameter determines the size of the set created. In the absence of information on a sufficient number of transmissions, transmissions without statistics are added to the desired number. By default 17.-categories - parameter for creating a selection of certain categories of channels (all categories are taken into account by default), id categories can be seen in the section Content Settings - TV Categories.-channels only those channels whose id is specified in this parameter are considered.--election_name - the name of the collection. If not specified, the selection will be called "Days_number ($selection_size)".
Example of using a command:
Create a selection of 27 popular programs for Client=1 in 30 days with categories "Children" (id=2) and "Educational" (id=7):
smarty_manage create_epg_selection_by_popularity --selection_name="Children's cognitive" --client_id=1 --days_number=30 --selection_size=27 --categories=2 --categories=7 --settings=settings;
Creating a selection of popular films of the archive video library
Team:
smarty_manage create_vodpvr_selection_by_popularity --client_id=1 --days_number=3 --settings=settings;
The team creates a selection of popular videos from the archive video library based on the viewing of users.
Mandatory parameters:
-client_id - determines the Client identifier, within which the collection will be formed.
-days_number the number of days for which television viewing statistics are taken.
Optional parameters:
-channels - a list of channels, the transmissions of which take into account the statistics of television viewing.
-categories - a list of categories of channels, the transmissions of which take into account the statistics of television viewing.
--selection_size Maximum amount of content in the collection. Default 17.
--election_name - the name of the collection. The default is "Popular Videos X (Y)" or "Popular Videos X (Y)" where X is the days_number value and Y is selection_size.
Example of using a command:
Removal of films/series that were recorded more than 2 weeks ago:
smarty_manage create_vodpvr_selection_by_popularity --client_id=1 --days_number=7 --selection_size=30 --selection_name="Popular in the Archive" --channels=1 --channels=2 --categories=1 --categories=2 --settings=settings.