jeffersongoncalves/laravel-umami 问题修复 & 功能扩展

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

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

jeffersongoncalves/laravel-umami

Composer 安装命令:

composer require jeffersongoncalves/laravel-umami

包简介

This Laravel package seamlessly integrates Umami analytics into your Blade templates. Easily track website visits and user engagement directly within your Laravel application, providing valuable insights into your website's performance. This package simplifies the integration process, saving you tim

README 文档

README

Laravel Umami

Laravel Umami

Latest Version on Packagist GitHub Code Style Action Status Total Downloads

This Laravel package seamlessly integrates Umami analytics into your Blade templates. Easily track website visits and user engagement directly within your Laravel application, providing valuable insights into your website's performance. This package simplifies the integration process, saving you time and effort. With minimal configuration, you can leverage Umami's powerful analytics features to gain a clearer understanding of your audience and website usage.

Requirements

Installation

Install the package via composer:

composer require jeffersongoncalves/laravel-umami

If you haven't already, publish the spatie/laravel-settings migration to create the settings table:

php artisan vendor:publish --provider="Spatie\LaravelSettings\LaravelSettingsServiceProvider" --tag="migrations"

Then publish and run the Umami settings migration:

php artisan vendor:publish --tag=umami-settings-migrations
php artisan migrate

Usage

Add the Umami script to your Blade layout (typically in the <head> section):

@include('umami::script')

Configuring Settings

Settings are stored in the database and can be managed via code:

use JeffersonGoncalves\Umami\Settings\UmamiSettings;

$settings = app(UmamiSettings::class);
$settings->website_id = 'your-website-id';
$settings->host_analytics = 'https://your-umami-instance.com';
$settings->save();

Available Settings

Property Type Default Description
website_id ?string null Your Umami website ID (required for tracking)
host_analytics string https://cloud.umami.is URL of your Umami instance
host_url ?string null Override data destination URL
auto_track bool true Automatically track pageviews and events
domains ?string null Comma-delimited list of allowed domains
tag ?string null Tag to group events in the dashboard
exclude_search bool false Exclude search parameters from URL
exclude_hash bool false Exclude hash value from URL

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 0
  • 开发语言: Blade

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-09-30