stenvdb/craft-umami 问题修复 & 功能扩展

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

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

stenvdb/craft-umami

Composer 安装命令:

composer require stenvdb/craft-umami

包简介

Statistics and chart widgets for umami

README 文档

README

Statistics and chart widgets for Umami.

Screenshot

Requirements

This plugin requires Craft CMS 3.0.0-beta.23 or later and Umami

Installation

To install the plugin, follow these instructions.

  1. Open your terminal and go to your Craft project:

     cd /path/to/project
    
  2. Then tell Composer to load the plugin:

     composer require stenvdb/craft-umami
    
  3. In the Control Panel, go to Settings → Plugins and click the “Install” button for Umami.

Configuring Umami

This plugin obviously requires Umami running on one of your servers. Once it is up and running (which is super easy), configure Umami's settings in a config/umami.php file (multi-site config is supported). See an example below:

<?php

return array(
    '*' => array(
        // The domain name where Umami is hosted. This is also the URL where the tracker code is pointed to.
        'baseUri' => '$UMAMI_BASE_URI',

        // The website ID of this site. You can find the ID in your tracking code snippet.
        'websiteId' => '$UMAMI_WEBSITE_ID',

        // You can also use multi-site config values, e.g.
        // 'websiteId' => [
        //     'default' => '$UMAMI_WEBSITE_ID',
        //     '<...>' => '<...>'
        // ]

        'username' => '$UMAMI_USERNAME',

        'password' => '$UMAMI_PASSWORD',

        // Automatically inject a tracking script in your site
        'injectTracking' => false,
    ),
    'production' => [
        'injectTracking' => true,
    ],
);

Tracking Code Snippet

When enabling injectTracking setting, the tracking snippet will automatically be injected into the head section of your site. This is disabled by default.

Alternatively you can use the following code snippet to force the code injection in your template:

{% do craft.umami.inject() %}

Umami Roadmap

  • Entry tracking report field (on a per entry basis)
  • Have an idea? Let me know

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-08-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固