rocramer/nova-matomo-analytics 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

rocramer/nova-matomo-analytics

最新稳定版本:v0.5.0

Composer 安装命令:

composer require rocramer/nova-matomo-analytics

包简介

Matomo Analytics cards for Laravel Nova.

README 文档

README

Matomo Analytics for Nova provides some basic Matomo metrics and page tables for your Laravel Nova dashboard.

image

Installation

You can install the package via composer:

composer require rocramer/nova-matomo-analytics

After that you can register the following metrics on a dashboard of your choice:

protected function cards()
{
    return [
        new \Rocramer\MatomoAnalytics\Cards\UniqueVisitors(),
        new \Rocramer\MatomoAnalytics\Cards\Visits(),
        new \Rocramer\MatomoAnalytics\Cards\VisitLength(),
        new \Rocramer\MatomoAnalytics\Cards\BounceRate(),
        new \Rocramer\MatomoAnalytics\Cards\Outlinks(),
        new \Rocramer\MatomoAnalytics\Cards\Downloads(),
        new \Rocramer\MatomoAnalytics\Cards\EntryPages(),
        new \Rocramer\MatomoAnalytics\Cards\ExitPages(),
        new \Rocramer\MatomoAnalytics\Cards\MostViewedPages(),
    ];
}

The plugin requires your Matomo url, token and side id in your config/services.php file:

'matomo' => [
    'token'   => env('MATOMO_TOKEN'),
    'url'     => env('MATOMO_URL'),
    'page_id' => env('MATOMO_PAGE_ID')
]

This is a first version. More Nova Cards and an own dashboard for Matomo metrics are planned for the future.

Feel free to create a PR or contribute suggestions.

Customization

Caching

By default, all cards get cached for 5 minutes. You can change that behaviour by adding a caching setting with the number of minutes you want to cache within your config/services.php file:

'matomo' => [
    'token'   => env('MATOMO_TOKEN'),
    'url'     => env('MATOMO_URL'),
    'page_id' => env('MATOMO_PAGE_ID'),
    'caching' => 3
]

If you want to fully disable caching for the cards, just set the value to false.

Localization

This package uses localization via Laravel Translation Strings. Therefore, you can add localization support for your cards by adding the keys with their corresponding translations to your JSON localization files. So, for German language support add the following keys in resources/lang/vendor/nova/de.json:

"Unique Visitors": "Eindeutige Besucher",
"Visits": "Aufrufe",
"Visit Length": "Besuchsdauer",
"Outlinks": "Ausgehende Verweise",
"Bounce Rate": "Absprungrate",
"Downloads": "Downloads",
"seconds (avg.)": "Sekunden (Durchschnitt)",
"Days": "Tage",
"Clicks": "Klicks",
"Unique Clicks": "Eindeutige Klicks",
"URL": "URL",
"No data found.": "Keine Daten gefunden.",
"Time on Page (avg.)": "Besuchsdauer (Durchschnitt)",
"Exit Rate": "Ausstiegsrate",
"Page Load Time (avg.)": "Seitenladezeit (Durchschnitt)",
"Entry Pages": "Einstiegsseiten",
"Exit Pages": "Ausstiegsseiten",
"Most Viewed Pages": "Am häufigsten besuchte Seiten",

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 24.85k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 23
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 23
  • Watchers: 2
  • Forks: 5
  • 开发语言: Vue

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-11-15