vitorbizarra/laravel-gtag
最新稳定版本:2.0.2
Composer 安装命令:
composer require vitorbizarra/laravel-gtag
包简介
This is my package laravel-gtag
README 文档
README
An package to easily setup Google GTag in Laravel apps
Installation
You can install the package via composer:
composer require vitorbizarra/laravel-gtag
You can publish the config file with:
php artisan vendor:publish --tag="laravel-gtag-config"
This is the contents of the published config file:
return [ /* * The Google Analytics id, should be a code that looks something like "G-xxxx". */ 'id' => env('GTAG_ID', ''), /* * Enable or disable script rendering. Useful for local development. */ 'enabled' => env('GTAG_ENABLED', true), /* * Configures the Google Analytics script domain. */ 'domain' => env('GTAG_DOMAIN', 'www.googletagmanager.com'), ];
Optionally, you can publish the views using
php artisan vendor:publish --tag="laravel-gtag-views"
Usage
{{-- layout.blade.php --}}
<head>
@include('gtag::script')
{{-- ... --}}
</head>
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.
统计信息
- 总下载量: 364
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-05-07