{"id":16317787,"url":"https://github.com/akiraz2/yii2-stat","last_synced_at":"2025-03-20T22:30:48.005Z","repository":{"id":56943317,"uuid":"129308500","full_name":"akiraz2/yii2-stat","owner":"akiraz2","description":"Yii2 Multi Web Statistic Module (yametrika, google-analytic, own db-counter)","archived":false,"fork":false,"pushed_at":"2020-11-27T17:35:41.000Z","size":46,"stargazers_count":19,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-11T22:09:28.696Z","etag":null,"topics":["counter","google-analytics","statistics","yandex-metrika","yii2","yii2-extension","yii2-modules","yii2-statistics"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/akiraz2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-12T20:37:12.000Z","updated_at":"2024-09-05T12:17:16.000Z","dependencies_parsed_at":"2022-08-21T07:50:49.397Z","dependency_job_id":null,"html_url":"https://github.com/akiraz2/yii2-stat","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akiraz2%2Fyii2-stat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akiraz2%2Fyii2-stat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akiraz2%2Fyii2-stat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akiraz2%2Fyii2-stat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akiraz2","download_url":"https://codeload.github.com/akiraz2/yii2-stat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243846981,"owners_count":20357295,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["counter","google-analytics","statistics","yandex-metrika","yii2","yii2-extension","yii2-modules","yii2-statistics"],"created_at":"2024-10-10T22:09:18.080Z","updated_at":"2025-03-20T22:30:47.685Z","avatar_url":"https://github.com/akiraz2.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Yii2 Multi Web Statistic Module [![Packagist Version](https://img.shields.io/packagist/v/akiraz2/yii2-stat.svg?style=flat-square)](https://packagist.org/packages/akiraz2/yii2-stat) [![Total Downloads](https://img.shields.io/packagist/dt/akiraz2/yii2-stat.svg?style=flat-square)](https://packagist.org/packages/akiraz2/yii2-stat) [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)\n\n\u003e **NOTE:** Module is in initial development. Anything may change at any time. \nНа данный момент текущая рабочая версия v0.3 - есть только счетчики яндекса и google и собственный счетчик в DB\n\nStatistics and Analytics module for your website. Many systems of your choice, connect either in the config module or in the admin panel:\n\n* **Яндекс-Метрика**\n* **Google Analytics**\n* Liveinternet\n* TopMail\n* Bigmir *(для украинской аудитории)*\n* Alexa\n* Hotlog\n* Rambler\n* Openstat\n* и даже на выбор **собственная** система для отслеживания посетителей по их IP-адресам и cookie.\n\n\nTo develop the Yii2 Stat module, the developments of these modules were used:\n* [klisl/yii2-statistics](https://github.com/klisl/yii2-statistics) (inspired)\n* [hiqdev/yii2-yandex-metrika](https://github.com/hiqdev/yii2-yandex-metrika) (code)\n\nSometimes not all site visits are recorded by Yandex or Google counters. \nTo visit was accurately counted (and this is very important for tracking advertising sources), \nuse server logs or in our case you can use the minimum working counter in PHP.\n\n\n## Features\n\n* вы можете использовать внешние сервисы на свой вкус, выбор простым конфигурированием модуля\n* есть собственная простая система сбора статистики\n* данные хранятся в отдельной таблице базы данных или на ваше усмотрение (*Redis*, etc)\n* статистика формируется на основе уникальных IP адресов посетителей сайта/приложения и Cookie\n* можно посмотреть страну, **город**, какой браузер и расширение, **referer**\n* **источник перехода** (inner, search, direct, ads (from UTM-tags), unknown)\n* **отсеивание поисковых ботов** (11шт)\n* есть возможность добавления IP, которые не нужны в статистике, в черный спискок\n* удобная фильтрация вывода результатов статистики (за день, период, по определенному IP)\n\n\nWhat information is displayed for each individual visitor:\n* its unique IP address with the ability to obtain information about its location\n* URL of the page being viewed and number of clicks\n* time to visit a particular page\n\n\n  \n## Installation\n\nThe preferred way to install this extension is through [composer](http://getcomposer.org/download/).\n\nEither run\n\n```\nphp composer.phar require --prefer-dist akiraz2/yii2-stat \"dev-master\"\n```\n\nor add\n\n```\n\"akiraz2/yii2-stat\": \"dev-master\"\n```\n\nto the require section of your `composer.json` file.\n\n\n### Migration\n\nMigration run\n\n```php\nyii migrate --migrationPath=@akiraz2/stat/migrations\n```\n\n### Config \n\nConfig common modules in common/config/main.php\n\n```php\n    'modules' =\u003e [\n        'stat' =\u003e [\n            'class' =\u003e akiraz2\\stat\\Module::class,\n            'yandexMetrika' =\u003e [ // false by default\n               'id' =\u003e 13788753,\n               'params' =\u003e [\n                   'clickmap' =\u003e true,\n                   'trackLinks' =\u003e true,\n                   'accurateTrackBounce' =\u003e true,\n                   'webvisor' =\u003e true\n               ]\n            ],\n            'googleAnalytics' =\u003e [ // false by default\n                'id' =\u003e 'UA-114443409-2',\n            ],\n            'ownStat' =\u003e true, //false by default\n            'ownStatCookieId' =\u003e 'yii2_counter_id', // 'yii2_counter_id' default\n            'onlyGuestUsers' =\u003e true, // true default\n            'countBot' =\u003e false, // false default\n            'appId' =\u003e ['app-frontend'], // by default count visits only from Frontend App (in backend app we dont need it)\n            'blackIpList' =\u003e [], // ['127.0.0.1'] by default\n            \n            // размещаем нашу админ панель на backend с проверкой доступа или ролями (здесь используется dektrium/user)\n            'controllerMap' =\u003e [\n                'dashboard' =\u003e [\n                    'class' =\u003e 'akiraz2\\stat\\controllers\\DashboardController',\n                    'as access' =\u003e [\n                        'class' =\u003e \\yii\\filters\\AccessControl::class,\n                        'rules' =\u003e [\n                            [\n                                'allow' =\u003e true,\n                                'roles' =\u003e ['@'],\n                                'matchCallback' =\u003e function () {\n                                    return Yii::$app-\u003euser-\u003eidentity-\u003egetIsAdmin();\n                                },\n                            ],\n                        ],\n                    ],\n                ],\n            ],\n        ],\n     ],    \n```\n\n## Usage\n//\n\n\nДля перехода на страницу статистики\n - с включенным ЧПУ в настройках Вашего приложения:\n**http://your-site.com/stat/dashboard/index**\n- без ЧПУ:\n**http://your-site.com/web/index.php?r=stat/dashboard/index**\n\n\n## Development\n\n### TODO\n1. Optimize db usage (for inner db-counter)\n2. Real dashboard, analytics\n3. Remove unnecessary code from previous packages\n4. Add other services (Hotlog, Openstat, etc)\n5. Translate dashboard\n\nPlease translate to your language! Edit config `@vendor/akiraz2/yii2-stat/src/messages/config.php`, add your language and run script:\n```php\nphp ./yii message/extract @akiraz2/stat/messages/config.php\n```\ntranslate file will be in `@vendor/akiraz2/yii2-stat/src/messages/` or your configured path\n\n\n## Support\n\nIf you have any questions or problems with Yii2-Stat you can ask them directly\n by using following email address: `akiraz@bk.ru`.\n\n\n## Contributing\n\nIf you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome.\n+PSR-2 style coding.\n\nI can apply patch, PR in 2-3 days! If not, please write me `akiraz@bk.ru`\n\n## Licensing\n\nYii2-Stat is released under the MIT License. See the bundled [LICENSE.md](LICENSE.md)\nfor details. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakiraz2%2Fyii2-stat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakiraz2%2Fyii2-stat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakiraz2%2Fyii2-stat/lists"}