panchania83/laravel-nova-google-analytics-4
最新稳定版本:1.0.1
Composer 安装命令:
composer require panchania83/laravel-nova-google-analytics-4
包简介
Google Analytics 4 integration with Laravel Nova
README 文档
README
Installation
You can install the package in to a Laravel app that uses Nova via composer:
composer require panchania83/laravel-nova-google-analytics-4
Optionally, you can publish the config file of this package with this command:
php artisan vendor:publish --tag="analytics-config"
The following config file will be published in config/analytics.php
return [ /* * The property id of which you want to display data. */ 'property_id' => env('PROPERTY_ID'), /* * Path to the client secret json file. Take a look at the README of this package * to learn how to get this file. You can also pass the credentials as an array * instead of a file path. */ 'service_account_credentials_json' => storage_path('app/analytics/service-account-credentials.json'), ];
Also add this to the .env for your Nova app:
PROPERTY_ID=
Usage
Next up, you must register the card with Nova. This is typically done in the cards method of the NovaServiceProvider.
// in app/Providers/NovaServiceProvider.php // ... public function cards() { return [ // ... new \panchania83\LaravelNovaGoogleAnalytics4\VisitorsMetric, new \panchania83\LaravelNovaGoogleAnalytics4\GoogleAnalyticsCard, ]; }
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 280
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-10-13